Module: Ding::Helpers
Instance Method Summary collapse
-
#run_cmd(cmd) ⇒ Object
NOTE: only for commands where we are interested in the effect as unless verbose is turned on, stdout and stderr are suppressed.
Instance Method Details
#run_cmd(cmd) ⇒ Object
NOTE: only for commands where we are interested in the effect as unless verbose is turned on, stdout and stderr are suppressed
5 6 7 8 9 10 11 12 |
# File 'lib/ding/helpers.rb', line 5 def run_cmd(cmd) if self.[:verbose] puts "$ #{cmd}" else cmd << ' &>/dev/null ' end system cmd end |