Module: Linecook::CommandUtils
- Includes:
- Configurable
- Included in:
- Linecook::Commands::Run, Linecook::Commands::VirtualBoxCommand
- Defined in:
- lib/linecook/command_utils.rb
Instance Method Summary collapse
Instance Method Details
#sh(cmd) ⇒ Object
9 10 11 12 |
# File 'lib/linecook/command_utils.rb', line 9 def sh(cmd) $stderr.puts "$ #{cmd}" unless quiet system(cmd) end |
#sh!(cmd) ⇒ Object
14 15 16 17 18 |
# File 'lib/linecook/command_utils.rb', line 14 def sh!(cmd) unless sh(cmd) raise CommandError, "non-zero exit status: #{$?.exitstatus}" end end |