Class: Navy::Runner
- Inherits:
-
Object
- Object
- Navy::Runner
- Defined in:
- lib/navy/runner.rb
Class Method Summary collapse
Class Method Details
.launch(cmd, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/navy/runner.rb', line 5 def self.launch(cmd, ={}) logger = [:logger] || Navy::Logger.new command = cmd.join(' ') logger.notice("Launching #{command}") stdout, stderr, status = Open3.capture3(cmd.join(' ')) unless status.success? logger.color(:red, "Error") logger.color(:red, stderr) end status.success? end |