Skip to content

Commit

Permalink
fix(cli): invalid variable message (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrynhard authored Jan 15, 2018
1 parent 72061b1 commit 1e57715
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .conform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ policies:
- "test"
scopes:
- "ci"
- "cli"
- "docker"
- "git"
- "metadata"
Expand Down
3 changes: 2 additions & 1 deletion cmd/enforce.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ var enforceCmd = &cobra.Command{
for _, variable := range varArray {
s := strings.Split(variable, "=")
if len(s) != 2 {
panic("interface{}")
fmt.Printf("Variable key and value must be delimited by a '=': [%s]", variable)
os.Exit(1)
}
e.Metadata.Variables[s[0]] = s[1]
}
Expand Down

0 comments on commit 1e57715

Please sign in to comment.