Skip to content

Commit

Permalink
Merge pull request #3240 from donoghuc/GH-3236
Browse files Browse the repository at this point in the history
(GH-3236) Only set ruby env vars on local transport when they exist
  • Loading branch information
mcdonaldseanp authored Oct 5, 2023
2 parents 6d662cb + 8080be7 commit 73be078
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/bolt/transport/local/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def execute(command)
# Only do this if bundled-ruby is set to false, not nil
ruby_env_vars = if target.transport_config['bundled-ruby'] == false
RUBY_ENV_VARS.each_with_object({}) do |e, acc|
acc[e] = ENV["BOLT_ORIG_#{e}"] if ENV["BOLT_ORIG_#{e}"]
if ENV["BOLT_ORIG_#{e}"] && !ENV["BOLT_ORIG_#{e}"].empty?
acc[e] = ENV["BOLT_ORIG_#{e}"]
end
end
end

Expand Down

0 comments on commit 73be078

Please sign in to comment.