Sha256: d37a8af822c53a04f739f7ec05f01a7faecb534c641642f00dfc76534702ad46

Contents?: true

Size: 513 Bytes

Versions: 1

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

module CobraCommander
  # Execute commands on all components of a ComponentTree
  module Executor
    def self.exec(components, command, printer = $stdout)
      Bundler.with_original_env do
        components.each do |component|
          component.root_paths.each do |path|
            printer.puts "===> #{component.name} (#{path})"
            output, = Open3.capture2e(command, chdir: path)
            printer.puts output
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cobra_commander-0.8.1 lib/cobra_commander/executor.rb