-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement #1196 #1199
Implement #1196 #1199
Conversation
I need to clean up the code because i think it uses an older version of the plugin as base (still using |
Added License text back and removed the now unused ENV_VAR_REGEX |
Updated with current master |
So i consider this ready to be merged now. Thanks again @davidlatwe for helping find the remaining issue (see last commit reverting one of the changes). Tests are all green now, in addition to the Actions all running successfully i also checked locally that tests run fine with python 3.x. |
Hey Thorsten, Any chance we can get a TL;DR on this? I'm still not quite sure of the whole picture on this one, and info seems to be fairly scattered. I'm specifically not clear on the ENV_VAR_REGEX override. This regex is used to convert env-var refs in package commands (ie non-shell-specific) into shell-specific representation (via convert_tokens). However, (and confusingly) the docstring on ENV_VAR_REGEX suggests it may be extended to support shell-specific forms. I just want to be sure that this fix isn't a fix for the wrong reasons, if you see what I mean? Thx |
Hey Allan, yes totally and sorry for the lack of context. The The TL;DR is changing There are two reasons for this: First, the old implementation used the Secondly - and the bigger issue - this actually breaks in certain constellations when you call rez from a rez shell (in PowerShell / PowerShell Core). This is because it is not a built in command of cmd.exe or PowerShell but an actual executable (like doskey for the alias command in In addition i think this will also solve an issue that Chad Vernon reported on Slack where in their environment using In regards to |
Ah right yes, sorry I did check ENV_VAR_REGEX in master and yes it was already there, I didn't see it and thought it had been added in this PR. I agree that it's outside the scope of this PR, but I'm left wondering why we did this. Let's address this in #1233 |
"HKEY_CURRENT_USER\\\\Environment", "PATH", "REG_(EXPAND_)?SZ", | ||
"(.*)" | ||
]) | ||
cmd = ["powershell", "(Get-ItemProperty -Path HKCU:Environment).Path"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could collapse this into a loop over the two different powershell calls and get rid of some code here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nerdvegas Also a good point, i changed that, please check again if the new version is okay for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see inline comments
oh I think maybe you accidentally reintroduced the |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
You are totally right. It's 1am already, i should have pushed this to tomorrow i guess. sigh I THINK i got it all corrected now, tests are still passing and formatting is fixed too. Sorry for the additional loops. |
This is a work in progress PR to implement #1196. Initial prototype done by @davidlatwe has been integrated here as a start.