Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Not all executables are binary
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Dec 3, 2011
1 parent 36c9f92 commit 26fa77a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/bundler.rb
Expand Up @@ -246,14 +246,14 @@ def mkdir_p(path)
end
end

def which(binary)
if File.executable? binary
binary
def which(executable)
if File.executable?(executable)
executable
else
path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |path|
File.executable? File.join(path, binary)
File.executable?(File.join(path, executable))
}
path && File.expand_path(binary, path)
path && File.expand_path(executable, path)
end
end

Expand Down

0 comments on commit 26fa77a

Please sign in to comment.