Mike McQuaid
a11fe57cd2
cache_store: handle corrupt DBM database.
...
When the DBM database cannot be read by the current version of Ruby's
DBM library (due to corruption or another incompatibility) it segfaults
or freezes which takes down the entire Homebrew Ruby process.
This isn't desirable so instead perform a shell out with the Homebrew
Ruby to see if it can read the DBM database before we try to use the
information. If this hangs or crashes: silently delete the database and
recreate it.
2018-09-20 10:57:27 +01:00
Markus Reiter
e9b9ea49a1
Update to RuboCop 0.59.1.
2018-09-17 03:45:59 +02:00
Mike McQuaid
512073ad38
cache_store: create HOMEBREW_CACHE when needed.
...
Fixes #4366 .
2018-06-21 13:59:07 +01:00
Mike McQuaid
44f5d3ec79
Refactor cache store code.
2018-05-22 14:46:14 +01:00
Andrew R. McBurney
360a301503
Fix file path issue caused by dbm implicitly appending .db
to end of file path provided.
2018-05-21 12:27:53 -04:00
Andrew R. McBurney
e93e8f3266
Lazily load db of type DBM
instance variable for DatabaseCache
so the corresponding database file isn't created in the .use
block for a DatabaseCache
.
2018-05-18 16:37:01 -04:00
Andrew R. McBurney
cd6f89ca76
Made DatabaseCache.new
private, and changes instances in code that call it to use DatabaseCache.use
instead.
2018-05-18 10:06:30 -04:00
Andrew R. McBurney
ddd2ec05d8
Added static use
method for DatabaseCache
.
2018-05-17 16:56:59 -04:00
Andrew R. McBurney
17f484b0ae
Set the return_value
from the initialize
block in the DatabaseCache
.
2018-05-15 13:15:30 -04:00
AndrewMcBurney
2c7ae2544b
Updated documentation for cache_store
.
2018-03-06 13:39:34 -05:00
AndrewMcBurney
c5a6724c5c
WIP
2018-03-06 11:42:45 -05:00
AndrewMcBurney
d7765dd223
Separated os/mac/cache_store.rb
into cache_store.rb
and os/mac/linkage_cache_store.rb
.
2018-02-28 10:39:15 -05:00