diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-10 11:52:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-10 11:52:56 +0000 |
commit | 538f7ccc8ee81589eb6defd87255eed1c4e64e83 (patch) | |
tree | 9f11dbc53edf0599b8ad634e7b0fb23fe9508bf2 /spec | |
parent | 3597c2082849da0749fa74944c08fb730d4bcdf1 (diff) | |
download | ruby-538f7ccc8ee81589eb6defd87255eed1c4e64e83.tar.gz |
cli_spec.rb: prefer BUNDLE_RUBY
* spec/bundler/bundler/cli_spec.rb: prefer BUNDLE_RUBY over env
hack. on macOS 10.11 or later, some system commands, e.g.
/bin/sh and /usr/bin/env, clear DYLD_LIBRARY_PATH environment
variable which is necessary to run not-yet installed command.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/bundler/cli_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb index 07ae92719c..d41e6de4a7 100644 --- a/spec/bundler/bundler/cli_spec.rb +++ b/spec/bundler/bundler/cli_spec.rb @@ -15,7 +15,8 @@ RSpec.describe "bundle executable" do it "looks for a binary and executes it if it's named bundler-<task>" do File.open(tmp("bundler-testtasks"), "w", 0o755) do |f| - f.puts "#!/usr/bin/env ruby\nputs 'Hello, world'\n" + ruby = ENV['BUNDLE_RUBY'] || "/usr/bin/env ruby" + f.puts "#!#{ruby}\nputs 'Hello, world'\n" end with_path_added(tmp) do |