diff options
| author | Markus Reiter | 2017-11-29 13:49:54 +0100 |
|---|---|---|
| committer | GitHub | 2017-11-29 13:49:54 +0100 |
| commit | 12d4177fbc9b9d915549753552fe51a2c60e718e (patch) | |
| tree | 9c535546152b0e915cca9f2503a66415b8295fd9 /Library/Homebrew | |
| parent | 2b7788d134e1d7eac02b73e681889cc147b0f20d (diff) | |
| parent | 5d449cf34e659dfc21ef67fbc4a0dbc70718e904 (diff) | |
| download | brew-12d4177fbc9b9d915549753552fe51a2c60e718e.tar.bz2 | |
Merge pull request #3495 from reitermarkus/cask-external-commands
Fix external Cask commands.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index 215b59843..e2deb6f67 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -113,9 +113,9 @@ module Hbc # other Ruby libraries must do everything via "require" klass.run(*args) end - elsif which("brewcask-#{command}") + elsif external_command = which("brewcask-#{command}", ENV["HOMEBREW_PATH"]) # arbitrary external executable on PATH, Homebrew-style - exec "brewcask-#{command}", *ARGV[1..-1] + exec external_command, *ARGV[1..-1] elsif Pathname.new(command.to_s).executable? && command.to_s.include?("/") && !command.to_s.match(/\.rb$/) |
