Skip to content

Commit

Permalink
+missing mkdir for when --no-cleanup is used
Browse files Browse the repository at this point in the history
  • Loading branch information
brightpuddle committed Dec 20, 2022
1 parent 95d6703 commit e5bbca5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ func getPreRunFiles(workingDir string) map[string]struct{} {
// cleanup cleans up temp files
func cleanup(workingDir string, preRunFiles map[string]struct{}, mv bool) {
dir, _ := os.ReadDir(workingDir)
if mv {
os.MkdirAll(filepath.Join(workingDir, cleanupPath), 0755)
}
for _, file := range dir {
if file.Name() == "terraform.tfstate" {
continue
Expand Down

0 comments on commit e5bbca5

Please sign in to comment.