From 67d6f58f31025552cccccbca79c80532d8da8bc5 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 9 Sep 2019 11:12:57 -0700 Subject: [PATCH] main: use cliconfig.ConfigDir instead of just ConfigDir main.ConfigDir is just a wrapper around cliconfig.ConfigDir to allow us to gradually clean up the old calls here, but since this is new code we might as well do it right from the start. --- commands.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands.go b/commands.go index 7acc05c4f..fffbb3639 100644 --- a/commands.go +++ b/commands.go @@ -4,13 +4,15 @@ import ( "os" "os/signal" + "github.com/mitchellh/cli" + "github.com/hashicorp/terraform/command" + "github.com/hashicorp/terraform/command/cliconfig" "github.com/hashicorp/terraform/command/webbrowser" pluginDiscovery "github.com/hashicorp/terraform/plugin/discovery" "github.com/hashicorp/terraform/svchost" "github.com/hashicorp/terraform/svchost/auth" "github.com/hashicorp/terraform/svchost/disco" - "github.com/mitchellh/cli" ) // runningInAutomationEnvName gives the name of an environment variable that @@ -51,7 +53,7 @@ func initCommands(config *Config, services *disco.Disco) { services.ForceHostServices(host, hostConfig.Services) } - configDir, err := ConfigDir() + configDir, err := cliconfig.ConfigDir() if err != nil { configDir = "" // No config dir available (e.g. looking up a home directory failed) }