Merge pull request #4369 from MikeMcQuaid/cache_store_mkpath
cache_store: create HOMEBREW_CACHE when needed.
This commit is contained in:
commit
b87fc8c53a
@ -62,7 +62,10 @@ class CacheStoreDatabase
|
|||||||
# @return [DBM] db
|
# @return [DBM] db
|
||||||
def db
|
def db
|
||||||
# DBM::WRCREAT: Creates the database if it does not already exist
|
# 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
|
end
|
||||||
|
|
||||||
# Creates a CacheStoreDatabase
|
# Creates a CacheStoreDatabase
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user