Class: Shellter::Runners::Windows

Inherits:
Base
  • Object
show all
Defined in:
lib/shellter/runners/windows.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Shellter::Runners::Base

Instance Method Details

#run(command, &block) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/shellter/runners/windows.rb', line 5

def run(command, &block)
  exit_status = nil
  Open3.popen3(File.basename(command)) do |stdin, stdout, stderr, wait_thread|
    yield stdout, stderr, stdin, wait_thread.pid
    exit_status = wait_thread.value
  end
  exit_status
end