Class: Build::BuildTask::CommandFailure
- Inherits:
-
Graph::TransientError
- Object
- Graph::TransientError
- Build::BuildTask::CommandFailure
- Defined in:
- lib/build/build_node.rb
Overview
Represents a failure when a spawned command exits with a non-zero status.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
Instance Method Summary collapse
- #executable_name ⇒ Object
-
#initialize(task, arguments, status) ⇒ CommandFailure
constructor
Initialize the failure with the task, arguments, and exit status.
Constructor Details
#initialize(task, arguments, status) ⇒ CommandFailure
Initialize the failure with the task, arguments, and exit status.
78 79 80 81 82 83 84 |
# File 'lib/build/build_node.rb', line 78 def initialize(task, arguments, status) @task = task @arguments = arguments @status = status super "#{File.basename(executable_name).inspect} exited with status #{@status.to_i}" end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
96 97 98 |
# File 'lib/build/build_node.rb', line 96 def arguments @arguments end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
97 98 99 |
# File 'lib/build/build_node.rb', line 97 def status @status end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
95 96 97 |
# File 'lib/build/build_node.rb', line 95 def task @task end |
Instance Method Details
#executable_name ⇒ Object
87 88 89 90 91 92 93 |
# File 'lib/build/build_node.rb', line 87 def executable_name if @arguments[0].kind_of? Hash @arguments[1] else @arguments[0] end end |