Skip to content

Commit

Permalink
Merge pull request #46 from uselagoon/compose-validation-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Jun 12, 2022
2 parents 65040a1 + 64cd3df commit 290de93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func init() {
"The fastly service ID to use")
rootCmd.Flags().StringVarP(&fastlyAPISecretPrefix, "fastly-api-secret-prefix", "A", "fastly-api-",
"The fastly secret prefix to use")
rootCmd.Flags().BoolVarP(&ignoreNonStringKeyErrors, "ignore-non-string-key-errors", "", true,
rootCmd.PersistentFlags().BoolVarP(&ignoreNonStringKeyErrors, "ignore-non-string-key-errors", "", true,
"Ignore non-string-key docker-compose errors (true by default, subject to change).")
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/validate_compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ var (

var validateDockerCompose = &cobra.Command{
Use: "docker-compose",
Aliases: []string{"compose", "docker", "dc"},
Aliases: []string{"compose", "dc"},
Short: "Verify docker-compose file for compatability with this tool",
Run: func(cmd *cobra.Command, args []string) {
// @TODO: ignoreNonStringKeyErrors is `true` by default because Lagoon doesn't enforce
// docker-compose compliance yet
err := ValidateDockerCompose(dockerComposeFile, ignoreNonStringKeyErrors)
if err != nil {
fmt.Println(fmt.Sprintf("There is an issue with the docker-compose file, see errors below\n%s", err.Error()))
fmt.Println(err.Error())
os.Exit(1)
}
},
Expand Down

0 comments on commit 290de93

Please sign in to comment.