diff options
| author | Jack Nagel | 2013-01-26 13:18:44 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-01-26 13:18:45 -0600 |
| commit | 9a179d8b062eb4e148ae4f39375572ef3efaaa60 (patch) | |
| tree | 838dae14d31282bc103841ea2c02f70358a53af7 /Library/Homebrew | |
| parent | 2534c1d45e4410221a948591fe3ad985558d320d (diff) | |
| download | brew-9a179d8b062eb4e148ae4f39375572ef3efaaa60.tar.bz2 | |
locks: ensure lock directory exists
Fixes Homebrew/homebrew#17326.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formula.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/keg.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 15ce8889c..7af0989a7 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -229,6 +229,7 @@ class Formula end def lock + HOMEBREW_CACHE_FORMULA.mkpath lockpath = HOMEBREW_CACHE_FORMULA/"#{@name}.brewing" @lockfile = lockpath.open(File::RDWR | File::CREAT) unless @lockfile.flock(File::LOCK_EX | File::LOCK_NB) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 4949d24dc..674ac881f 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -62,6 +62,7 @@ class Keg < Pathname end def lock + HOMEBREW_CACHE_FORMULA.mkpath path = HOMEBREW_CACHE_FORMULA/"#{fname}.brewing" file = path.open(File::RDWR | File::CREAT) unless file.flock(File::LOCK_EX | File::LOCK_NB) |
