Skip to content

Commit

Permalink
Update call to escape_string with is_shell_path arg
Browse files Browse the repository at this point in the history
Signed-off-by: amorphousWaste <20346603+amorphousWaste@users.noreply.github.com>
  • Loading branch information
amorphousWaste authored and Jawabiscuit committed Sep 15, 2023
1 parent c55ee1b commit a9d4de5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/rezplugins/shell/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
7 changes: 6 additions & 1 deletion src/rezplugins/shell/sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a9d4de5

Please sign in to comment.