class CommandFailure
Represents a failure when a spawned command exits with a non-zero status.
Definitions
def initialize(task, arguments, status)
Initialize the failure with the task, arguments, and exit status.
Signature
-
parameter
taskBuild::BuildTask The task that spawned the command.
-
parameter
argumentsArray The command arguments that were run.
-
parameter
statusProcess::Status The exit status of the command.
Implementation
def initialize(task, arguments, status)
@task = task
@arguments = arguments
@status = status
super "#{File.basename(executable_name).inspect} exited with status #{@status.to_i}"
end
def executable_name
Signature
-
returns
String The name of the executable that failed.
Implementation
def executable_name
if @arguments[0].kind_of? Hash
@arguments[1]
else
@arguments[0]
end
end