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.25.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.24.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.23.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.22.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.21.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.20.1 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.20.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.19.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.18.1 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.18.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.17.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.16.1 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.16.0 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.15.6 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.15.5 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.15.4 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.15.3 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.15.2 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.15.1 lib/project_types/script/layers/infrastructure/command_runner.rb
shopify-cli-2.15.0 lib/project_types/script/layers/infrastructure/command_runner.rb