Skip to content

Commit 783c9b2

Browse files
committed
[Truffle] JT: use system since it works better on windows.
* Improve message on failure.
1 parent 86c8313 commit 783c9b2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tool/jt.rb

+9-3
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ def self.find_graal
3535
module ShellUtils
3636
private
3737

38+
def raw_sh(*args)
39+
unless system(*args)
40+
$stderr.puts "FAILED (#{$?}): #{args * ' '}"
41+
exit $?.exitstatus
42+
end
43+
end
44+
3845
def sh(*args)
3946
Dir.chdir(JRUBY_DIR) do
40-
system(*args)
41-
raise 'failed' unless $? == 0
47+
raw_sh(*args)
4248
end
4349
end
4450

@@ -106,7 +112,7 @@ def run(*args)
106112
jruby_args += %w[-J-XX:+UnlockDiagnosticVMOptions -J-XX:CompileCommand=print,*::callRoot]
107113
end
108114

109-
exec(env_vars, "#{JRUBY_DIR}/bin/jruby", *jruby_args, *args)
115+
raw_sh(env_vars, "#{JRUBY_DIR}/bin/jruby", *jruby_args, *args)
110116
end
111117

112118
def test(*args)

0 commit comments

Comments
 (0)