Module: SimpleCov::CLI::Affected::SystemRunner

Extended by:
SystemRunner
Included in:
SystemRunner
Defined in:
lib/simplecov/cli/affected/runner.rb

Overview

JRuby on Windows answers Process.wait2 with a nil status and ignores the chdir option Kernel#system takes, so there the runner starts inside Dir.chdir, and Kernel#system reports its status.

Instance Method Summary collapse

Instance Method Details

#call(command, root) ⇒ Object

Raises:

  • (Errno::ENOENT)


25
26
27
28
29
30
# File 'lib/simplecov/cli/affected/runner.rb', line 25

def call(command, root)
  ran = Dir.chdir(root) { system(*command) }
  raise Errno::ENOENT, command.first if ran.nil?

  $CHILD_STATUS.exitstatus || 1
end