From 162be6b4114e793d51d4d7ef240b73d1da95b5ae Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 1 Jul 2019 13:34:41 +0200 Subject: [PATCH] Don't treat non-directory arguments as paths. --- Library/Homebrew/cask/config.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/config.rb b/Library/Homebrew/cask/config.rb index 527e3f0722..8c2aa3da68 100644 --- a/Library/Homebrew/cask/config.rb +++ b/Library/Homebrew/cask/config.rb @@ -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