Skip to content

Commit b600c95

Browse files
soda92hsbt
authored andcommitted
[rubygems/rubygems] skip checking title on Windows because it's not supported
ruby/rubygems@fd2c54f371
1 parent 328d203 commit b600c95

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

spec/bundler/commands/exec_spec.rb

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,11 @@ def bin_path(a,b,c)
730730
puts "EXEC: \#{caller.grep(/load/).empty? ? 'exec' : 'load'}"
731731
puts "ARGS: \#{$0} \#{ARGV.join(' ')}"
732732
puts "MYRACK: \#{MYRACK}"
733-
process_title = `ps -o args -p \#{Process.pid}`.split("\n", 2).last.strip
733+
if Gem.win_platform?
734+
process_title = "ruby"
735+
else
736+
process_title = `ps -o args -p \#{Process.pid}`.split("\n", 2).last.strip
737+
end
734738
puts "PROCESS: \#{process_title}"
735739
RUBY
736740

@@ -748,9 +752,11 @@ def bin_path(a,b,c)
748752
let(:args) { "ARGS: #{path} arg1 arg2" }
749753
let(:myrack) { "MYRACK: 1.0.0" }
750754
let(:process) do
751-
title = "PROCESS: #{path}"
752-
title += " arg1 arg2"
753-
title
755+
if Gem.win_platform?
756+
"PROCESS: ruby"
757+
else
758+
"PROCESS: #{path} arg1 arg2"
759+
end
754760
end
755761
let(:exit_code) { 0 }
756762
let(:expected) { [exec, args, myrack, process].join("\n") }
@@ -952,7 +958,13 @@ def bin_path(a,b,c)
952958

953959
context "when disable_exec_load is set" do
954960
let(:exec) { "EXEC: exec" }
955-
let(:process) { "PROCESS: ruby #{path} arg1 arg2" }
961+
let(:process) do
962+
if Gem.win_platform?
963+
"PROCESS: ruby"
964+
else
965+
"PROCESS: ruby #{path} arg1 arg2"
966+
end
967+
end
956968

957969
before do
958970
bundle "config set disable_exec_load true"

0 commit comments

Comments
 (0)