Browse Source

adding additional bool

pull/66/head
Steve Min 7 years ago
parent
commit
7eb591941c
  1. 10
      plugin.go

10
plugin.go

@ -32,6 +32,7 @@ type (
Parallelism int Parallelism int
Targets []string Targets []string
VarFiles []string VarFiles []string
PluginDir bool
} }
Netrc struct { Netrc struct {
@ -45,7 +46,7 @@ type (
BackendConfig []string `json:"backend-config"` BackendConfig []string `json:"backend-config"`
Lock *bool `json:"lock"` Lock *bool `json:"lock"`
LockTimeout string `json:"lock-timeout"` LockTimeout string `json:"lock-timeout"`
PluginDir string `json:"plugin-dir` PluginPath string `json:"plugin-path`
} }
// Plugin represents the plugin instance to be executed // Plugin represents the plugin instance to be executed
@ -206,9 +207,10 @@ func initCommand(config InitOptions) *exec.Cmd {
args = append(args, fmt.Sprintf("-lock-timeout=%s", config.LockTimeout)) args = append(args, fmt.Sprintf("-lock-timeout=%s", config.LockTimeout))
} }
// "" is default in TF if config.PluginDir == true {
if config.PluginDir != "" { if config.PluginPath != "" {
args = append(args, fmt.Sprintf("-plugin-dir=%s", config.PluginDir)) args = append(args, fmt.Sprintf("-plugin-dir=%s", config.PluginPath))
}
} }
// Fail Terraform execution on prompt // Fail Terraform execution on prompt

Loading…
Cancel
Save