diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-02-29 20:56:51 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-02-29 20:56:51 -0600 |
commit | f8d07b1446a8e2e42468a2676b9fe47d9f3d1089 (patch) | |
tree | 5793dace0d3661aa872ae7fb6848c530f76ab7ce | |
parent | f590c8b5b6d845cd10c87fa1a3c1f6ea049f56ef (diff) | |
download | bundler-f8d07b1446a8e2e42468a2676b9fe47d9f3d1089.tar.gz |
Fix which to compare quotes correctly on 1.8.7
-rw-r--r-- | lib/bundler.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 3516cf75d9..dcb151b058 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -304,8 +304,9 @@ module Bundler if File.file?(executable) && File.executable?(executable) executable elsif paths = ENV["PATH"] + quote = '"'.freeze paths.split(File::PATH_SEPARATOR).find do |path| - path = path[1..-2] if path[0] == '"' && path[-1] == '"' + path = path[1..-2] if path.start_with?(quote) && path.end_with?(quote) executable_path = File.expand_path(executable, path) return executable_path if File.file?(executable_path) && File.executable?(executable_path) end |