Any use of resetenv() in the commands() function results in a traceback that ends with
File "/laika/dist/third_party/linux_rocky9_x86_64/rez/v3.3.0/lib/python3.11/site-packages/rez/shells.py", line 137, in get_output
script = '\n'.join(self._lines) + '\n'
^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 76: expected str instance, NoneType found
This is because resetenv() is set to the return value of setenv() but setenv() doesn't return anything. And even if it did, resetenv() wouldn't do what rezconfig.py implies that it would.
Environment
- OS rocky9.4
- Rez version 3.3.0
- Rez python version 3.11.12
To Reproduce
def commands():
setenv("FOO", "value")
resetenv("FOO", "new_value")
then build this package and do rez env <package_name>
Expected behavior
The variable 'FOO' would be reset to "new_value"
Actual behavior
Traceback as described above
Related Issues/PRs
I couldn't find any issues related to this
Any use of
resetenv()in thecommands()function results in a traceback that ends withThis is because
resetenv()is set to the return value ofsetenv()butsetenv()doesn't return anything. And even if it did,resetenv()wouldn't do whatrezconfig.pyimplies that it would.Environment
To Reproduce
then build this package and do
rez env <package_name>Expected behavior
The variable 'FOO' would be reset to "new_value"
Actual behavior
Traceback as described above
Related Issues/PRs
I couldn't find any issues related to this