Permalink
Browse files

Not all executables are binary

  • Loading branch information...
1 parent 36c9f92 commit 26fa77aea2c8dc7d738b7df355206966043c9b96 @sferik sferik committed Dec 3, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/bundler.rb
View
@@ -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

0 comments on commit 26fa77a

Please sign in to comment.