use the new Meta.ShutdownCh when building commands
This commit is contained in:
parent
3aaa1e9d04
commit
6884a07bba
13
commands.go
13
commands.go
|
@ -63,6 +63,8 @@ func initCommands(config *Config) {
|
||||||
RunningInAutomation: inAutomation,
|
RunningInAutomation: inAutomation,
|
||||||
PluginCacheDir: config.PluginCacheDir,
|
PluginCacheDir: config.PluginCacheDir,
|
||||||
OverrideDataDir: dataDir,
|
OverrideDataDir: dataDir,
|
||||||
|
|
||||||
|
ShutdownCh: makeShutdownCh(),
|
||||||
}
|
}
|
||||||
|
|
||||||
// The command list is included in the terraform -help
|
// The command list is included in the terraform -help
|
||||||
|
@ -80,23 +82,20 @@ func initCommands(config *Config) {
|
||||||
Commands = map[string]cli.CommandFactory{
|
Commands = map[string]cli.CommandFactory{
|
||||||
"apply": func() (cli.Command, error) {
|
"apply": func() (cli.Command, error) {
|
||||||
return &command.ApplyCommand{
|
return &command.ApplyCommand{
|
||||||
Meta: meta,
|
Meta: meta,
|
||||||
ShutdownCh: makeShutdownCh(),
|
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
"console": func() (cli.Command, error) {
|
"console": func() (cli.Command, error) {
|
||||||
return &command.ConsoleCommand{
|
return &command.ConsoleCommand{
|
||||||
Meta: meta,
|
Meta: meta,
|
||||||
ShutdownCh: makeShutdownCh(),
|
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
"destroy": func() (cli.Command, error) {
|
"destroy": func() (cli.Command, error) {
|
||||||
return &command.ApplyCommand{
|
return &command.ApplyCommand{
|
||||||
Meta: meta,
|
Meta: meta,
|
||||||
Destroy: true,
|
Destroy: true,
|
||||||
ShutdownCh: makeShutdownCh(),
|
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue