Don't treat non-directory arguments as paths.

This commit is contained in:
Markus Reiter 2019-07-01 13:34:41 +02:00
parent ab3664fda6
commit 162be6b411

View File

@ -54,7 +54,15 @@ module Cask
end end
def self.canonicalize(config) 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 end
attr_accessor :explicit attr_accessor :explicit