From a9d4de5b3f5ab763b7ff7210fcc370f9cab58124 Mon Sep 17 00:00:00 2001 From: amorphousWaste <20346603+amorphousWaste@users.noreply.github.com> Date: Thu, 22 Sep 2022 16:01:52 -0700 Subject: [PATCH] Update call to escape_string with is_shell_path arg Signed-off-by: amorphousWaste <20346603+amorphousWaste@users.noreply.github.com> --- src/rezplugins/shell/cmd.py | 6 +++++- src/rezplugins/shell/sh.py | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/rezplugins/shell/cmd.py b/src/rezplugins/shell/cmd.py index 708acdd49..f5fc152d8 100644 --- a/src/rezplugins/shell/cmd.py +++ b/src/rezplugins/shell/cmd.py @@ -296,7 +296,11 @@ def shebang(self): pass def setenv(self, key, value): - value = self.escape_string(value, is_path=self._is_pathed_key(key)) + value = self.escape_string( + value, + is_path=self._is_pathed_key(key), + is_shell_path=self._is_shell_pathed_key(key), + ) self._addline('set %s=%s' % (key, value)) def unsetenv(self, key): diff --git a/src/rezplugins/shell/sh.py b/src/rezplugins/shell/sh.py index 7fa7631db..c4d8d7db1 100644 --- a/src/rezplugins/shell/sh.py +++ b/src/rezplugins/shell/sh.py @@ -104,7 +104,12 @@ def _bind_interactive_rez(self): self._addline(cmd % r"\[\e[1m\]$REZ_ENV_PROMPT\[\e[0m\]") def setenv(self, key, value): - value = self.escape_string(value, is_path=self._is_pathed_key(key)) + value = self.escape_string( + value, + is_path=self._is_pathed_key(key), + is_shell_path=self._is_shell_pathed_key(key), + ) + self._addline('export %s=%s' % (key, value)) def unsetenv(self, key):