diff options
| author | sodacris <wjxa20152015@gmail.com> | 2025-01-04 10:48:46 +0800 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-09-26 08:27:13 +0900 |
| commit | b600c95dc1b9aff1b49743be7d007649bc38c643 (patch) | |
| tree | 7292960fadc0318dd857804e1a41428101a333bd | |
| parent | 328d2037a6bf24e26a7d144e80ab8c1a9c9fd868 (diff) | |
[rubygems/rubygems] skip checking title on Windows because it's not supported
https://github.com/rubygems/rubygems/commit/fd2c54f371
| -rw-r--r-- | spec/bundler/commands/exec_spec.rb | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb index cad1ac4ba3..49465fa07b 100644 --- a/spec/bundler/commands/exec_spec.rb +++ b/spec/bundler/commands/exec_spec.rb @@ -730,7 +730,11 @@ RSpec.describe "bundle exec" do puts "EXEC: \#{caller.grep(/load/).empty? ? 'exec' : 'load'}" puts "ARGS: \#{$0} \#{ARGV.join(' ')}" puts "MYRACK: \#{MYRACK}" - process_title = `ps -o args -p \#{Process.pid}`.split("\n", 2).last.strip + if Gem.win_platform? + process_title = "ruby" + else + process_title = `ps -o args -p \#{Process.pid}`.split("\n", 2).last.strip + end puts "PROCESS: \#{process_title}" RUBY @@ -748,9 +752,11 @@ RSpec.describe "bundle exec" do let(:args) { "ARGS: #{path} arg1 arg2" } let(:myrack) { "MYRACK: 1.0.0" } let(:process) do - title = "PROCESS: #{path}" - title += " arg1 arg2" - title + if Gem.win_platform? + "PROCESS: ruby" + else + "PROCESS: #{path} arg1 arg2" + end end let(:exit_code) { 0 } let(:expected) { [exec, args, myrack, process].join("\n") } @@ -952,7 +958,13 @@ RSpec.describe "bundle exec" do context "when disable_exec_load is set" do let(:exec) { "EXEC: exec" } - let(:process) { "PROCESS: ruby #{path} arg1 arg2" } + let(:process) do + if Gem.win_platform? + "PROCESS: ruby" + else + "PROCESS: ruby #{path} arg1 arg2" + end + end before do bundle "config set disable_exec_load true" |
