Class: Moku::Shell::Basic

Inherits:
Object
  • Object
show all
Defined in:
lib/moku/shell/basic.rb

Overview

A basic shell

Instance Method Summary collapse

Instance Method Details

#run(command) ⇒ Status

Run the given command

Returns:


14
15
16
17
18
19
20
# File 'lib/moku/shell/basic.rb', line 14

def run(command)
  Moku.logger.debug(command)
  Bundler.with_clean_env do
    stdout, stderr, status = Open3.capture3(command)
    Status.new(status.success?, stdout, stderr)
  end
end