Skip to content

Commit

Permalink
Merge pull request #765 from eli-schwartz/portable-command-v
Browse files Browse the repository at this point in the history
Use portable "command -v" to detect installed programs
  • Loading branch information
BanzaiMan authored Sep 3, 2020
2 parents 8e5ef45 + 140fef7 commit d60ef2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/travis/tools/system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def description(*args)
def has?(command)
return false unless unix?
@has ||= {}
@has.fetch(command) { @has[command] = system "which #{command} 2>/dev/null >/dev/null" }
@has.fetch(command) { @has[command] = system "command -v #{command} 2>/dev/null >/dev/null" }
end

def running?(app)
Expand Down

0 comments on commit d60ef2c

Please sign in to comment.