lib/cobra_commander/executor.rb in cobra_commander-0.8.0 vs lib/cobra_commander/executor.rb in cobra_commander-0.8.1

- old
+ new

@@ -2,14 +2,16 @@ module CobraCommander # Execute commands on all components of a ComponentTree module Executor def self.exec(components, command, printer = $stdout) - components.each do |component| - component.root_paths.each do |path| - printer.puts "===> #{component.name} (#{path})" - output, = Open3.capture2e(command, chdir: path, unsetenv_others: true) - printer.puts output + 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