mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Fixed inspec from crashing on startup when it can't create the cache directory.
Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
aebcd3c119
commit
c9a3c927f9
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ module Inspec
|
|||
def initialize(path = nil)
|
||||
@path = path || File.join(Inspec.config_dir, "cache")
|
||||
FileUtils.mkdir_p(@path) unless File.directory?(@path)
|
||||
rescue Errno::EACCES
|
||||
# ignore
|
||||
end
|
||||
|
||||
def prefered_entry_for(key)
|
||||
|
|
Loading…
Reference in a new issue