From 50959a654c9ba372b910d81662490210c97b8b4b Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 20 Jul 2016 15:55:05 -0700 Subject: [PATCH] command: Remove second DefaultDataDirectory const (#7666) --- command/command.go | 4 ---- command/init.go | 2 +- command/meta.go | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/command/command.go b/command/command.go index 80e82e78c..d9ad0cf30 100644 --- a/command/command.go +++ b/command/command.go @@ -22,10 +22,6 @@ const DefaultVarsFilename = "terraform.tfvars" // DefaultBackupExtension is added to the state file to form the path const DefaultBackupExtension = ".backup" -// DefaultDataDirectory is the directory where local state is stored -// by default. -const DefaultDataDirectory = ".terraform" - // DefaultParallelism is the limit Terraform places on total parallel // operations as it walks the dependency graph. const DefaultParallelism = 10 diff --git a/command/init.go b/command/init.go index 627fcb229..bcc339bee 100644 --- a/command/init.go +++ b/command/init.go @@ -58,7 +58,7 @@ func (c *InitCommand) Run(args []string) int { // Set the state out path to be the path requested for the module // to be copied. This ensures any remote states gets setup in the // proper directory. - c.Meta.dataDir = filepath.Join(path, DefaultDataDirectory) + c.Meta.dataDir = filepath.Join(path, DefaultDataDir) source := args[0] diff --git a/command/meta.go b/command/meta.go index 3b0896352..69f3e3e5c 100644 --- a/command/meta.go +++ b/command/meta.go @@ -174,7 +174,7 @@ func (m *Meta) Context(copts contextOpts) (*terraform.Context, bool, error) { // DataDir returns the directory where local data will be stored. func (m *Meta) DataDir() string { - dataDir := DefaultDataDirectory + dataDir := DefaultDataDir if m.dataDir != "" { dataDir = m.dataDir }