Sha256: 9277826a0b1b4b15cba12c6793ac996bc3188eea07ebf2d0ca78f526258adf56

Contents?: true

Size: 419 Bytes

Versions: 44

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

module Script
  module Layers
    module Infrastructure
      class CommandRunner
        include SmartProperties

        property! :ctx, accepts: ShopifyCLI::Context

        def call(cmd)
          out, status = ctx.capture2e(cmd)
          raise Errors::SystemCallFailureError.new(out: out.chomp, cmd: cmd) unless status.success?
          out
        end
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
shopify-cli-2.14.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.13.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.12.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.11.2 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.11.1 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.11.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.10.2 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.10.1 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.10.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.9.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.8.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.7.4 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.7.3 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.7.2 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.7.1 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.7.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.6.6 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.6.5 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.6.4 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.6.3 lib/project_types/script/layers/infrastructure/command_runner.rb