Set user environment variables by default when giving --global in Windows#468
Set user environment variables by default when giving --global in Windows#468saschanaz wants to merge 2 commits into
--global in Windows#468Conversation
|
This change looks great! The only slight concern I have is changing the default. Do you know that history here? Why would setting system-wide have been desirable? Under what circumstances would it still be desirable? Do we need the option at all? Maybe we simply remove the option and always set user settings? @juj do you remember why this was done this way in the first place? |
| # Looks at the current PATH and adds and removes entries so that the PATH reflects | ||
| # the set of given active tools. | ||
| def adjusted_path(tools_to_activate, log_additions=False, system_path_only=False): | ||
| def adjusted_path(tools_to_activate, log_additions=False, system=False): |
There was a problem hiding this comment.
Looks like the log_additions param is never uses, or passed. Unrelated to this PR but since your are changing that line maybe delete it?
|
The intent of calling Then, (The doc piece at emsdk --help looks like up to date with this respect: There has never existed an option to perform "Current user" only registry activation. If that is desirable, perhaps it would be good to have that as a new option |
--global in Windows
Sorry for misleading description, but no, this doesn't change I think defaulting to user global environment with |
It feels like changing |
|
IMO it's global user variables and global system variables, not "local", which sounds like non-permanent local shell variable. (Like in this page for example) |
|
I also feel like changing the meaning of an existing flag I a little confusing/misleading. How about simply removing the old Any users of the old |
|
|
|
|
|
Does |
|
I like |
|
Any update on this? I think it would be good change overall. |
|
I'll try get some time this weekend. |
|
Any update? |
aminya
left a comment
There was a problem hiding this comment.
This is a very good change. What is blocking this from merging?
Can someone with write access update this branch?
| arg_old = extract_bool_arg('--old') | ||
| arg_uses = extract_bool_arg('--uses') | ||
| arg_global = extract_bool_arg('--global') | ||
| arg_system = extract_bool_arg('--system') |
There was a problem hiding this comment.
If arg_system is provided but arg_global is not, it should automatically set that. In other words, system means permanent too!
| arg_system = extract_bool_arg('--system') | |
| arg_system = extract_bool_arg('--system') | |
| if arg_system | |
| arg_global=True |
|
|
|
I have to admit that I'm not actively using emsdk nowadays. I still intend to work on it but if anyone wants to take this over, please do. |
|
No problem. Hopefully someone can pick this up and get it landed. |
|
@sbc100 this is almost ready. If you have write-access why don't you just finish it? Remember the more we wait, there will be more work to fix the conflicts |
|
I will get around to it at some point sure, but I've got a lot of other things I'm working so if anyone else want to pick this up in the mean time feel free. |
|
Well, this is a critical bug on Windows, and we should fix it as soon as possible. I don't want emsdk to remove all the programs from my PATH! |
Fixes #467
This makes
./emsdk activate --globalto 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.