command: Remove second DefaultDataDirectory const (#7666)
This commit is contained in:
parent
07cd0bfc13
commit
50959a654c
|
@ -22,10 +22,6 @@ const DefaultVarsFilename = "terraform.tfvars"
|
||||||
// DefaultBackupExtension is added to the state file to form the path
|
// DefaultBackupExtension is added to the state file to form the path
|
||||||
const DefaultBackupExtension = ".backup"
|
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
|
// DefaultParallelism is the limit Terraform places on total parallel
|
||||||
// operations as it walks the dependency graph.
|
// operations as it walks the dependency graph.
|
||||||
const DefaultParallelism = 10
|
const DefaultParallelism = 10
|
||||||
|
|
|
@ -58,7 +58,7 @@ func (c *InitCommand) Run(args []string) int {
|
||||||
// Set the state out path to be the path requested for the module
|
// 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
|
// to be copied. This ensures any remote states gets setup in the
|
||||||
// proper directory.
|
// proper directory.
|
||||||
c.Meta.dataDir = filepath.Join(path, DefaultDataDirectory)
|
c.Meta.dataDir = filepath.Join(path, DefaultDataDir)
|
||||||
|
|
||||||
source := args[0]
|
source := args[0]
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ func (m *Meta) Context(copts contextOpts) (*terraform.Context, bool, error) {
|
||||||
|
|
||||||
// DataDir returns the directory where local data will be stored.
|
// DataDir returns the directory where local data will be stored.
|
||||||
func (m *Meta) DataDir() string {
|
func (m *Meta) DataDir() string {
|
||||||
dataDir := DefaultDataDirectory
|
dataDir := DefaultDataDir
|
||||||
if m.dataDir != "" {
|
if m.dataDir != "" {
|
||||||
dataDir = m.dataDir
|
dataDir = m.dataDir
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue