Method: GDCM::Shell#run
- Defined in:
- lib/gdcm/shell.rb
#run(command, options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/gdcm/shell.rb', line 13 def run(command, = {}) stdout, stderr, status = execute(command, stdin: [:stdin]) if status != 0 && .fetch(:whiny, GDCM.whiny) fail GDCM::Error, "`#{command.join(" ")}` failed with error:\n#{stderr}" end $stderr.print(stderr) unless [:stderr] == false [stdout, stderr, status] end |