Skip to content

Commit

Permalink
Merge pull request #704 from prizov/master
Browse files Browse the repository at this point in the history
exit when env variables substitution fails
  • Loading branch information
mkubaczyk authored Aug 23, 2022
2 parents 3796260 + ce7fc8f commit 1abb8d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions internal/app/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func (l *Logger) Error(message string) {
l.Logger.Error(message)
}

func (l *Logger) Critical(message string) {
l.notifyAboutFailureUsingWebhooks(message)
l.Logger.Critical(message)
}

func (l *Logger) Fatal(message string) {
l.notifyAboutFailureUsingWebhooks(message)
l.Logger.Fatal(message)
Expand Down
4 changes: 2 additions & 2 deletions internal/app/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func substituteVarsInYaml(file string) string {
yamlFile := string(rawYamlFile)
if !flags.noEnvSubst && flags.substEnvValues {
if err := validateEnvVars(yamlFile, file); err != nil {
log.Critical(err.Error())
log.Fatal(err.Error())
}
yamlFile = substituteEnv(yamlFile)
}
Expand Down Expand Up @@ -207,7 +207,7 @@ func validateEnvVars(s string, filename string) error {
}
}
if err := scanner.Err(); err != nil {
log.Critical(err.Error())
log.Fatal(err.Error())
}
}
return nil
Expand Down

0 comments on commit 1abb8d4

Please sign in to comment.