Skip to content

Commit

Permalink
:p: Ensure folder structire before creating lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnjack committed Dec 18, 2023
1 parent 25dfdfc commit f3bcc60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func acquireLock(envDir string, attempt int) error {
time.Sleep(1 * time.Second)
return acquireLock(envDir, attempt+1)
}
if err = os.MkdirAll(path.Dir(lockFileName), 0755); err != nil {
return err
}
_, err = os.Create(lockFileName)
return err
}
Expand Down

0 comments on commit f3bcc60

Please sign in to comment.