-
Notifications
You must be signed in to change notification settings - Fork 654
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
On windows, construct environment separately when storing to registry #648
base: master
Are you sure you want to change the base?
Conversation
a4ef38f
to
2d6d136
Compare
3c12628
to
16faaa3
Compare
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 #642 (comment). That PR considers all the cases (--system
, --permamnet
, none of them
). It includes the tests for all of them.
16faaa3
to
c50027d
Compare
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 am interested to know if this fixes the Process PATH preservation.
You can add process test by pasting this code at here and here
if (Compare-Object -ReferenceObject $PATH_Process_BEFORE.Split(';') -DifferenceObject $PATH_Process.Split(';') ) {
echo "Old process path is ...................."
echo $PATH_Process_BEFORE
echo "Current process path is ................"
echo $PATH_Process
throw "User PATH are changed while --system had been provided"
}
9ad7455
to
edd6175
Compare
We can't use the set of environment variable when setting local valus and when storing to the registry. This is because the new PATH value is constructed very differently when updating the local shell compared to when updating the registry. Add test that verifies that no path elements are removed by emsdk_env. This includes not re-ordering or removing duplicates that might exist already in the user's path. Fixes: #634
edd6175
to
32fd1c7
Compare
I don't think that will work because activation is supposed to add to the process path so it will be different afterwards. The test that I've added added in this RR in |
We can't use the same set of environment variables when setting local
values and when storing to the windows registry.
This is because the new PATH value is constructed very differently
when updating the local shell compared to when updating the
registry.
Add test that verifies that no path elements are removed by
emsdk_env. This includes not re-ordering or removing duplicates
that might exist already in the user's path.
Fixes: #634