feat(path): Isolate Scoop apps' PATH#5840
Conversation
- `strip_path()` -> `Find-Path()` - `ensure_in_path()`/`add_first_in_path()` -> `Add-Path()` - `remove_from_path()` -> `Remove-Path()`
|
Is it a replacement of #5813? |
Yes, after reviewing the above PR, I found a simpler and clearer way to implement the feature. This was especially true after refactoring the EnvVar-related functions. Initially, I attempted to modify pull request #5813, but ultimately decided it would be easier to create a new one instead. |
afd93ff to
b0f3d0d
Compare
b0f3d0d to
f36f9b7
Compare
We need a transition period. |
|
What for, if I may ask? |
|
By setting |
|
As far as I'm concerned it is a breaking change from the implementation level. But since it has changed to force this behavoir I don't talk about it. My review on the PR (latest commits not included) has done previously. |
|
Got the idea. So it's better to offer config now and notify users that we'll change the default behavior and change it a few months later. What's your opinion? @chawyehsu @rashil2000 |
|
I don't have an issue with providing a config option per se - I just don't see purpose in involving user interaction in an internal implementation detail. |
b81735f to
a2b13b3
Compare
|
So choose an implementation here and then we can start bumping the version. If config, I'll revert the last commit and wait for several months to submit a PR again, if default, then directly merge all commits. |
a2b13b3 to
9ea0119
Compare
|
In addition to |
|
No, putting |
I am not arguing that it is not self explanatory. I am saying that limiting it to 1 single environment variable breaks peoples environments who use that environment variable for other purposes (e.g setting the path to the scoop executable). It is fairly easy to allow configuration of the environment variable so its not a huge cost while the benefit to end users might be not having to fix their setup. |
Abstention |
|
Tired of this conversation. I'll save the current branch and reset it to the config implementation to avoid a significant user experience change. I'll also remind the user that we'll do the migration in six months. |
This reverts commit 9ea0119.
|
All done, please review again. |

Description
Separate from #5836, will rebase on
developwhen #5836 is merged.Use the
use_isolated_pathconfig option to separate Scoop apps PATH toSCOOP_PATH(or any other name), then add%SCOOP_PATH%to$env:Pathwhen installing apps withenv_add_pathfor the first time.Motivation and Context
This PR does the following:
-TargetEnvVarinAdd-Path()andRemove-Path()to add/remove path in different EnvVarsuse_isolated_pathinenv_add_path()andenv_rm_path()to add/remove apps path in%SCOOP_PATH%or%PATH%%SCOOP_PATH%when first add path to itPath switching is done with
Complete-ConfigChange().How Has This Been Tested?
Passed scoop test.

%SCOOP_PATH%is added correctly:Checklist:
developbranch.