Merge pull request #6270 from reitermarkus/config-dirs

Don't treat non-directory arguments as paths.
This commit is contained in:
Markus Reiter 2019-07-09 23:10:23 +02:00 committed by GitHub
commit de5cd926e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,15 @@ module Cask
end
def self.canonicalize(config)
config.map { |k, v| [k.to_sym, Pathname(v).expand_path] }.to_h
config.map do |k, v|
key = k.to_sym
if DEFAULT_DIRS.key?(key)
[key, Pathname(v).expand_path]
else
[key, v]
end
end.to_h
end
attr_accessor :explicit