Implement `` condition keyword (shell cmd status)
This commit is contained in:
18
lib/producer/core/tests/shell_command_status.rb
Normal file
18
lib/producer/core/tests/shell_command_status.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
module Producer
|
||||
module Core
|
||||
module Tests
|
||||
class ShellCommandStatus < Test
|
||||
def verify
|
||||
remote.execute(command)
|
||||
true
|
||||
rescue RemoteCommandExecutionError
|
||||
false
|
||||
end
|
||||
|
||||
def command
|
||||
arguments.first
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user