require 'pier/moor'
require 'pier/pier'
require 'pier/version'

module Pier
  def runShellProc(command)
    begin
      if command.respond_to?('each')
        command = command.map(&:shellescape).join(' ')
      end

      system(command)
    rescue Interrupt
    end

    $CHILD_STATUS
  end

  def runShellProcOrDie(command)
    result = runShellProc command

    if !result.nil? && result.exitstatus != 0 && !result.exitstatus.nil?
      exit result.exitstatus
    end
  end
end

require 'English'
require 'pier/moor'
require 'pier/pier'
require 'pier/version'

module Pier
  def runShellProc(command)
    begin
      if command.respond_to?('each')
        command = command.map(&:shellescape).join(' ')
      end

      system(command)
    rescue Interrupt
    end

    $CHILD_STATUS
  end

  def runShellProcOrDie(command)
    result = runShellProc command

    if !result.nil? && result.exitstatus != 0 && !result.exitstatus.nil?
      exit result.exitstatus
    end
  end
end

Fix undefined CHILD_STATUS variable error
Fix undefined CHILD_STATUS variable error

```
lib/pier.rb:16: warning: global variable `$CHILD_STATUS' not initialized
```
