Module: Dory::Sh

Defined in:
lib/dory/shell.rb

Class Method Summary collapse

Class Method Details

.run_command(command) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/dory/shell.rb', line 5

def self.run_command(command)
  stdout = `#{command}`
  OpenStruct.new({
    success?: $?.exitstatus == 0,
    exitstatus: $?.exitstatus,
    stdout: stdout
  })
end