Set user environment variables permanently by using --permanent + deprecate --global#621
Conversation
c6a230c to
a6ef5ae
Compare
In other words, system means permanent too!
a6ef5ae to
86358df
Compare
|
According to the comments in #468 we decided it was best not to change existing meaning of I think the best option was to add two new options
|
c2fc226 to
988b2d0
Compare
5e053e6 to
9f24f8e
Compare
|
I deprecated |
|
I added the tests, which shows that pywin32 code part of emsdk is broken. Nothing is wrong with this PR, so I suggest that you merge it and instead try to fix the tests (probably by merging #91). Emsdk did not have these tests and this has caused many issues on Windows. Otherwise, you can comment this line to bypass the broken tests: https://github.com/emscripten-core/emsdk/pull/621/files#diff-1d37e48f9ceff6d8030570cd36286a61R93 or I can make the tests a separate PR. |
0ff3164 to
188c5ac
Compare
|
Yay, thanks for taking over! |
sbc100
left a comment
There was a problem hiding this comment.
I've not had a chance to look at the new test script but generally this change lgtm!
|
Is the CI error the last issue here? (maybe also the permanent/persistent naming question) |
This is not an issue of this PR. I added the tests, so we know that environment variables are not set on Windows (the behavior is broken). We need to fix the tests in other pull requests such as in #91. If you run the same tests using the deprecated
I don't feel strongly about this. I think |
--global in Windows--permanent + deprecate --global
Can you remove the tests from this PR then? somehow disable them or mark them as currently known/expected to fail? We don't want to land a change with the CI being red. |
I caught the failures in 2d7ccb2 This PR is ready to go. |
f257506 to
151c750
Compare
151c750 to
08bd96d
Compare
08bd96d to
2d7ccb2
Compare
|
I don't have a preference between I think if the code looks good to you @sbc100 , let's land it! |
sbc100
left a comment
There was a problem hiding this comment.
lgtm with a couple more comments. Ready to land once they are addressed.
0f85911 to
25867be
Compare
25867be to
ad16e5d
Compare
|
Looks like the removal of the second call to causes the issue: Previously it was adding the user and system PATHs together I think. I guess we should probably just ignore the registry when running in normal (non-persistent) mode and just look at the current os.environ['PATH']? |
Closes #468
Fixes #467
This makes ./emsdk activate --global to set user environment variables by default instead of previous system-wide-only activation.
Also removes some magic that implicitly nukes user envvars when system ones are shadowed, as a system admin should understand what's going on when setting envvars. Thus fixes #189 and closes #192.