Skip to content

Commit

Permalink
Removed environment variable to fix the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Abarca committed Jul 19, 2021
1 parent b9b344e commit 953ab28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contents/winrm_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def run_cmd(self, command, args=(), out_stream=None, err_stream=None):
if a.startswith('RD_'):
envs.update({a:os.getenv(a)})

if "RD_EXEC_COMMAND" in envs:
del envs["RD_EXEC_COMMAND"]

# TODO optimize perf. Do not call open/close shell every time
shell_id = self.protocol.open_shell(codepage=65001, env_vars=envs)
command_id = self.protocol.run_command(shell_id, command, args)
Expand Down

0 comments on commit 953ab28

Please sign in to comment.