Browse Source

Ensure correct TF_DATA_DIR is removed.

pull/83/head
DanBUK 6 years ago
parent
commit
e0ce75d159
No known key found for this signature in database GPG Key ID: 27052C4772FC4FA2
  1. 3
      plugin.go

3
plugin.go

@ -72,6 +72,7 @@ func (p Plugin) Exec() error {
assumeRole(p.Config.RoleARN)
}
os.Setenv("TF_DATA_DIR", ".terraform");
if p.Config.DataDir != "" {
os.Setenv("TF_DATA_DIR", p.Config.DataDir)
}
@ -181,7 +182,7 @@ func deleteCache() *exec.Cmd {
return exec.Command(
"rm",
"-rf",
".terraform",
os.Getenv("TF_DATA_DIR"),
)
}

Loading…
Cancel
Save