Skip to content

Commit

Permalink
Allow passing extra environment variables to PuppetCommand.format_com…
Browse files Browse the repository at this point in the history
…mand
  • Loading branch information
evgeni committed Oct 18, 2024
1 parent 05ecf82 commit 343d39f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/kafo/puppet_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def self.aio_puppet?
false
end

def self.format_command(command)
def self.format_command(command, extra_env = {})
if aio_puppet?
[clean_env_vars, command, :unsetenv_others => true]
[clean_env_vars.merge(extra_env), command, :unsetenv_others => true]
else
[::ENV, command, :unsetenv_others => false]
[::ENV.to_h.merge(extra_env), command, :unsetenv_others => false]
end
end

Expand Down

0 comments on commit 343d39f

Please sign in to comment.