Browse Source

Allow 'secrets' and 'vars' to be blank

pull/26/head
Jacob McCann 8 years ago
parent
commit
914ed2ba90
  1. 12
      main.go

12
main.go

@ -93,12 +93,16 @@ func run(c *cli.Context) error {
json.Unmarshal([]byte(c.String("terraform.remote")), &remote) json.Unmarshal([]byte(c.String("terraform.remote")), &remote)
var vars map[string]string var vars map[string]string
if err := json.Unmarshal([]byte(c.String("terraform.vars")), &vars); err != nil { if c.String("terraform.vars") != "" {
panic(err) if err := json.Unmarshal([]byte(c.String("terraform.vars")), &vars); err != nil {
panic(err)
}
} }
var secrets map[string]string var secrets map[string]string
if err := json.Unmarshal([]byte(c.String("terraform.secrets")), &secrets); err != nil { if c.String("terraform.secrets") != "" {
panic(err) if err := json.Unmarshal([]byte(c.String("terraform.secrets")), &secrets); err != nil {
panic(err)
}
} }
plugin := Plugin{ plugin := Plugin{

Loading…
Cancel
Save