lib/psychic/shell/mixlib_shellout_executor.rb in psychic-runner-0.0.7 vs lib/psychic/shell/mixlib_shellout_executor.rb in psychic-runner-0.0.8
- old
+ new
@@ -35,10 +35,12 @@
def execute(command, opts)
@logger = opts.delete(:logger) || logger
@shell = Mixlib::ShellOut.new(command, opts)
@shell.live_stream = IOToLog.new(@logger)
- @shell.run_command
+ Bundler.with_clean_env do
+ @shell.run_command
+ end
execution_result
rescue SystemCallError, *MIXLIB_SHELLOUT_EXCEPTION_CLASSES, TypeError => e
# See https://github.com/opscode/mixlib-shellout/issues/62
execution_error = ExecutionError.new(e)
execution_error.execution_result = execution_result