From 6884a07bbae0b4163a2d423249b056015086856a Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 1 Dec 2017 11:06:39 -0500 Subject: [PATCH] use the new Meta.ShutdownCh when building commands --- commands.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/commands.go b/commands.go index d65437f666..3335d2cdb5 100644 --- a/commands.go +++ b/commands.go @@ -63,6 +63,8 @@ func initCommands(config *Config) { RunningInAutomation: inAutomation, PluginCacheDir: config.PluginCacheDir, OverrideDataDir: dataDir, + + ShutdownCh: makeShutdownCh(), } // The command list is included in the terraform -help @@ -80,23 +82,20 @@ func initCommands(config *Config) { Commands = map[string]cli.CommandFactory{ "apply": func() (cli.Command, error) { return &command.ApplyCommand{ - Meta: meta, - ShutdownCh: makeShutdownCh(), + Meta: meta, }, nil }, "console": func() (cli.Command, error) { return &command.ConsoleCommand{ - Meta: meta, - ShutdownCh: makeShutdownCh(), + Meta: meta, }, nil }, "destroy": func() (cli.Command, error) { return &command.ApplyCommand{ - Meta: meta, - Destroy: true, - ShutdownCh: makeShutdownCh(), + Meta: meta, + Destroy: true, }, nil },