Skip to content

Commit

Permalink
Make lockfile path
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Jul 3, 2018
1 parent 2bfa5c8 commit 1b91088
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ func LoadLockfile(config *SourceConfig) (*SourceLockfile, error) {

// WriteLockfile updates or creates the lockfile on the system.
func WriteLockfile(lockfile *SourceLockfile, config *SourceConfig) error {
if err := os.MkdirAll(path.Dir(config.LockfilePath), 0777); err != nil {
return err
}

file, err := os.OpenFile(config.LockfilePath, os.O_RDWR|os.O_CREATE, 0666)
if err != nil {
return err
Expand Down

0 comments on commit 1b91088

Please sign in to comment.