Skip to content

Commit

Permalink
Merge pull request #4369 from MikeMcQuaid/cache_store_mkpath
Browse files Browse the repository at this point in the history
cache_store: create HOMEBREW_CACHE when needed.
  • Loading branch information
MikeMcQuaid authored Jun 21, 2018
2 parents 41e2792 + 512073a commit b87fc8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Library/Homebrew/cache_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ def created?
# @return [DBM] db
def db
# DBM::WRCREAT: Creates the database if it does not already exist
@db ||= DBM.open(dbm_file_path, DATABASE_MODE, DBM::WRCREAT)
@db ||= begin
HOMEBREW_CACHE.mkpath
DBM.open(dbm_file_path, DATABASE_MODE, DBM::WRCREAT)
end
end

# Creates a CacheStoreDatabase
Expand Down

0 comments on commit b87fc8c

Please sign in to comment.