0
0
mirror of https://github.com/thegeeklab/wp-opentofu.git synced 2024-11-09 18:00:40 +00:00

Allow 'secrets' and 'vars' to be blank

This commit is contained in:
Jacob McCann 2016-10-20 19:16:56 +05:30
parent ef64a0f2a3
commit 914ed2ba90

12
main.go
View File

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