Improve `sh' task action error handling:
Handle exit status code in Remote#execute.
This commit is contained in:
@@ -24,3 +24,16 @@ Feature: sh task action
|
||||
"""
|
||||
When I execute the recipe
|
||||
Then the output must contain "from remote"
|
||||
|
||||
Scenario: aborts on failed command execution
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :some_task do
|
||||
sh '\false'
|
||||
sh '\echo after_fail'
|
||||
end
|
||||
"""
|
||||
When I execute the recipe
|
||||
Then the output must not contain "after_fail"
|
||||
|
Reference in New Issue
Block a user