Skip to content

Commit

Permalink
Bugfix: RealShellExecutor now passes the environment vars from the ho…
Browse files Browse the repository at this point in the history
…st on get_output(), too
  • Loading branch information
daniel-albuschat committed Nov 5, 2020
1 parent 1b0d7a3 commit 2f8a1c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kubedev/kubedev.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def execute(self, commandWithArgs: list, envVars: dict = dict(), piped_input: st
def get_output(self, commandWithArgs, envVars: dict = dict(), check=True):
cmds = [cmd for cmd in commandWithArgs if cmd is not None]
print(f'{colorama.Fore.CYAN}➡️ Executing "{" ".join(cmds)}"')
cmdResult = subprocess.run(cmds, check=check, env=envVars, stdout=subprocess.PIPE, encoding='utf-8')
cmdResult = subprocess.run(cmds, check=check, env={**environ, **envVars}, stdout=subprocess.PIPE, encoding='utf-8')
if cmdResult.returncode == 0:
return cmdResult.stdout
else:
Expand Down

0 comments on commit 2f8a1c8

Please sign in to comment.