Sha256: 2ba1f7dd0b02f2fe8fb582bbee934d702de59076ffd27041ff4c4556c6f3eede

Contents?: true

Size: 366 Bytes

Versions: 6

Compression:

Stored size: 366 Bytes

Contents

module Nesta
  class SystemCommand
    def run(*args)
      system(*args)
      if ! $?.success?
        message = if $?.exitstatus == 127
                    "#{args[0]} not found"
                  else
                    "'#{args.join(' ')}' failed with status #{$?.exitstatus}"
                  end
        Nesta.fail_with(message)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nesta-0.18.0 lib/nesta/system_command.rb
nesta-0.17.0 lib/nesta/system_command.rb
nesta-0.16.0 lib/nesta/system_command.rb
nesta-0.15.0 lib/nesta/system_command.rb
nesta-0.14.0 lib/nesta/system_command.rb
nesta-0.13.0 lib/nesta/system_command.rb