aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-19 01:15:31 +0200
committerMarkus Reiter2016-10-19 18:20:34 +0200
commit1e92f997c13d149b72d00c24b53cd491babcda3c (patch)
treecdb29c604c6c32fcb0aed6ddab7aa5ea83495d2a /Library/Homebrew
parentb9fe36abdc5f1898be3f7884086bee5674ee0528 (diff)
downloadbrew-1e92f997c13d149b72d00c24b53cd491babcda3c.tar.bz2
Also use `which` to find `lsar` in PATH.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cask/lib/hbc/container/generic_unar.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/container/generic_unar.rb b/Library/Homebrew/cask/lib/hbc/container/generic_unar.rb
index 5fa0dbdce..7a465e12e 100644
--- a/Library/Homebrew/cask/lib/hbc/container/generic_unar.rb
+++ b/Library/Homebrew/cask/lib/hbc/container/generic_unar.rb
@@ -6,8 +6,7 @@ module Hbc
class Container
class GenericUnar < Base
def self.me?(criteria)
- lsar = Hbc.homebrew_prefix.join("bin", "lsar")
- lsar.exist? &&
+ !(lsar = which("lsar")).nil? &&
criteria.command.run(lsar,
args: ["-l", "-t", "--", criteria.path],
print_stderr: false).stdout.chomp.end_with?("passed, 0 failed.")