Sha256: d35340ba0c9e2e5492dc65df3442c5d7f7a1768ee20aad4ac4ba70abbf272929

Contents?: true

Size: 513 Bytes

Versions: 72

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/object/blank'
require 'shellwords'

module EacRubyUtils
  module Envs
    class Command
      module ExtraOptions
        def chdir(dir)
          duplicate_by_extra_options(chdir: dir)
        end

        private

        def append_chdir(command)
          extra_options[:chdir].present? ? "(cd '#{extra_options[:chdir]}' ; #{command} )" : command
        end
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
eac_tools-0.52.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.51.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.50.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.110.1 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.49.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.110.0 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.109.1 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.48.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.48.0 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.47.2 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb
eac_ruby_utils-0.109.0 lib/eac_ruby_utils/envs/command/extra_options.rb
eac_tools-0.47.1 sub/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb