Sha256: 94ac37f5b0b6ed6d110930c0034f0200f13d8934c0a3b04e2673b72be30b7b4f

Contents?: true

Size: 522 Bytes

Versions: 6

Compression:

Stored size: 522 Bytes

Contents

require "open3"

module EmberCli
  class Runner
    def initialize(env: {}, out:, err:, options: {})
      @env = env
      @out = out
      @err = err
      @options = options
    end

    def run!(command)
      output, status = Open3.capture2e(@env, command, @options)

      @out.write(output)

      unless status.success?
        @err.write <<-MSG.strip_heredoc
          ERROR: Failed command: `#{command}`
          OUTPUT:
            #{output}
        MSG

        exit 1
      end

      true
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ember-cli-rails-0.7.1 lib/ember_cli/runner.rb
ember-cli-rails-0.7.0 lib/ember_cli/runner.rb
ember-cli-rails-0.6.1 lib/ember_cli/runner.rb
ember-cli-rails-0.6.0 lib/ember_cli/runner.rb
ember-cli-rails-0.5.8 lib/ember_cli/runner.rb
ember-cli-rails-0.5.7 lib/ember_cli/runner.rb