Class: Moku::Shell::Passthrough

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

Overview

A shell that prints combined standard output and error to the given stream as the messages are received.

Instance Method Summary collapse

Constructor Details

#initialize(stream) ⇒ Passthrough

Returns a new instance of Passthrough.

Parameters:

  • stream (IO)

13
14
15
# File 'lib/moku/shell/passthrough.rb', line 13

def initialize(stream)
  @stream = stream
end

Instance Method Details

#run(command) ⇒ Status

Returns:


18
19
20
21
22
23
# File 'lib/moku/shell/passthrough.rb', line 18

def run(command)
  Moku.logger.debug(command)
  Bundler.with_clean_env do
    run_command(command)
  end
end