- Notifications
You must be signed in to change notification settings - Fork262
fix: fix problems with windows commands#942
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
fix: fix problems with windows commands#942
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@JCHacking please update the test Please also document your newly passed env variable to the |
Also, I agree this is a good addition to adjust the default shell env for windows related env vars. Please be thorough as I am unaware of what scripts on windows would need. |
Hi@codejedi365 In the case of non-windows systems, it is normal that none of these systems are present, so they will not be imported. |
I have been looking at the poetry and pdm code to see what environment variables they use and get an idea. There is a lot of variety. These are the variables documented by microsofthttps://learn.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables Do I add them all? |
codejedi365 commentedJun 1, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Agreed; I was just recommending this be included in the docs.
Edit: My answer is now yes, as part of that windows function, as there are so many vars |
codejedi365 commentedJun 1, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Great find, and no, that sounds like overkill. Let's break out a function for windows env as I mentioned in my code comment, and then only provide the non-CSIDL prefixed vars. Thank you for doing the due diligence here. |
It is not documented but I have added PATHEXT, this environment variable tells which are the extensions of the files that can be executed, I think it is useful. If you are ok with the way the code is now, I think about how we could test this (probably parameterized with sys.platform). |
Hi@codejedi365 The test And I have created another test |
It seems to be documented here related to powershell:https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.4 |
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.
Great work, thank you for putting in the time and effort. Just a few aesthetics remain, sorry for the delay in reply.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Formatted with ruff and changed tests to use patch_os_environment. |
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.
Great thank you for the updates. We can leave what you have for theis_windows ternary statement.
Great, then I see it as ready for me too. Let me know when this is versioned so I can update the library in my developments. Thank you very much!!! |
codejedi365 commentedJun 5, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🎉 This PR was released in version 9.8.1 🎉The release is available on: |
Uh oh!
There was an error while loading.Please reload this page.
Depending on the command it may fail in windows because:
I think it makes sense to include it by default instead of adding it when they have problems because it is not an environment variable as it could be SLOW_TEST=True or something like that.