lib/opal/cli_runners/phantomjs.rb in opal-0.7.0.beta1 vs lib/opal/cli_runners/phantomjs.rb in opal-0.7.0.beta2

- old
+ new

@@ -4,20 +4,20 @@ module CliRunners class Phantomjs def initialize(output = $stdout) @output = output end - attr_reader :output + attr_reader :output, :exit_status def run(code, argv) unless argv.empty? raise ArgumentError, 'Program arguments are not supported on the PhantomJS runner' end phantomjs = IO.popen(command, 'w', out: output) do |io| io.write(code) end - exit $?.exitstatus + @exit_status = $?.exitstatus end def command script_path = File.expand_path('../phantom.js', __FILE__) "phantomjs #{script_path.shellescape}"