Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Truffle] JT: use system since it works better on windows.
* Improve message on failure.
  • Loading branch information
eregon committed Jan 29, 2015
1 parent 86c8313 commit 783c9b2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tool/jt.rb
Expand Up @@ -35,10 +35,16 @@ def self.find_graal
module ShellUtils
private

def raw_sh(*args)
unless system(*args)
$stderr.puts "FAILED (#{$?}): #{args * ' '}"
exit $?.exitstatus
end
end

def sh(*args)
Dir.chdir(JRUBY_DIR) do
system(*args)
raise 'failed' unless $? == 0
raw_sh(*args)
end
end

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

exec(env_vars, "#{JRUBY_DIR}/bin/jruby", *jruby_args, *args)
raw_sh(env_vars, "#{JRUBY_DIR}/bin/jruby", *jruby_args, *args)
end

def test(*args)
Expand Down

0 comments on commit 783c9b2

Please sign in to comment.