install: fix cask install with env filtering.

With `HOMEBREW_ENV_FILTERING` simply running `brew` is not sufficient
to find `brew cask` so the full path needs to be passed.
This commit is contained in:
Mike McQuaid 2017-06-02 22:17:18 +01:00
parent 0731a68cde
commit 5dc11c6b93

View File

@ -95,9 +95,8 @@ module Homebrew
args << "--verbose" if ARGV.verbose?
ARGV.casks.each do |c|
cmd = "brew", "cask", "install", c, *args
ohai cmd.join " "
system(*cmd)
ohai "brew cask install #{c} #{args.join " "}"
system("#{HOMEBREW_PREFIX}/bin/brew", "cask", "install", c, *args)
end
end