Skip to content

Commit

Permalink
Merge pull request #19 from rightscale/PHX-2109_param_panic
Browse files Browse the repository at this point in the history
PHX-2109 Fix panic on non-existent param (#17)
  • Loading branch information
psschroeter authored Mar 12, 2020
2 parents d8dfedb + 000dde3 commit f820f72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/fpt/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v1.0.9 / 2020-03-12
-------------------
* Bump timeout for http client to 5 minutes
* Fix panic while passing non-existent options (#17)

v1.0.8 / 2020-02-28
-------------------
* Add short flag (`-C`) for credentials to go along with `--credentials`.
Expand Down
2 changes: 2 additions & 0 deletions cmd/fpt/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,15 @@ func parseOptions(pt *policytemplate.PolicyTemplate, runOptions []string) ([]*ap
paramNames = append(paramNames, p.Name)
}
errors = append(errors, fmt.Sprintf("%s does not appear in list of parameters: %s", name, strings.Join(paramNames, ", ")))
continue
}
var val interface{}
var err error
if len(bits) > 1 {
val, err = coerceOption(name, bits[1], p.Type)
if err != nil {
errors = append(errors, err.Error())
continue
}
}
options = append(options, &appliedpolicy.ConfigurationOptionCreateType{
Expand Down

0 comments on commit f820f72

Please sign in to comment.