aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-19 22:01:06 +0200
committerGitHub2016-10-19 22:01:06 +0200
commitfb29a31c72a21bb4cae0b5830ce3407e3a3d068e (patch)
tree7962dff5c1c400daeb210c1891ae051dc23165d0 /Library
parentde5cadc44797bb9af38c2c89231f0657a9bf3538 (diff)
parent1e92f997c13d149b72d00c24b53cd491babcda3c (diff)
downloadbrew-fb29a31c72a21bb4cae0b5830ce3407e3a3d068e.tar.bz2
Merge pull request #1320 from reitermarkus/which-lsar
Also use `which` to find `lsar` in PATH.
Diffstat (limited to 'Library')
-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.")