lib/hillary/shellable.rb in hillary-0.0.1 vs lib/hillary/shellable.rb in hillary-0.0.2

- old
+ new

@@ -17,18 +17,17 @@ @status = status end end def shell(command, options = {}) - binding.pry options = {ignore_errors: false, logger: Logger.new($stdout)}.merge(options) logger = options[:logger] logger.info(command) output = `#{command} 2>1` status = $? - unless status.success? + unless status.success? if options[:ignore_errors] logger.error(output) else raise ExecutionError.new(command, output, status.exitstatus) end