Closed cfxegbert closed 3 weeks ago
It ends up this is how os.path.expanduser works on windows. On unix if there is a string that is not a path separator after ~ it check for the existence of the user, on windows if the user isn't the current user it just blindly changes ~ to 'USERPROFILE'.
Looks like I can fix this by changing https://github.com/AcademySoftwareFoundation/rez/blob/main/src/rez/resolved_context.py#L1982 to
executor.setenv("REZ_USED_IMPLICIT_PACKAGES", EscapedString(implicit_str, is_literal=True))
Trying to figure out if I should use EscapedString
on all the REZ_USED variables
It could make sense yes.
On Windows the first tilde on the REZ_USED_IMPLICIT_PACKAGES is being expanded to %HOMEDRIVE%%HOMEPATH%. This is using the default config which under rez-3.x is using PowerShell as the default shell. I know Microsoft is changing the behavior of ~ in PowerShell.
Environment
To Reproduce
Expected behavior
Actual behavior