-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix(core): Fix detection of Git #5545
Conversation
Test-GitAvailable
, Get-HelperPath
(git)
I want to introduce another change here - in order to allow searching for paths of helpers that are installed independently by users. For example, if aria2c.exe or 7z.exe already exists on the user's machine, we should use that. See #5592 for example. @HUMORCE is it okay if I add this change in the |
For the download and extraction utils, we should impose some restrictions. this is also why I made #5548 |
What would be the rationale behind not allowing people to use their own helpers? We already allow that for git.exe and 7z.exe. People might similarly have aria2c.exe or dark.exe already installed. |
Due to the design, it has some inherent flaws from the beginning. For stability, all helpers should be installed/invoked like |
I'm not sure I understand, which flaws are we talking about.
If we require a specific feature of the helper, i.e. a specific version (and above), we just tell users to update their helpers. We won't have to make any changes to Core. |
Then why not use that version in beginning? By using specific versions of helpers, the user experience is consistent for all users. examples: We cannot use openssl 3.x in a program that depend on openssl 1.x 7zip 19.00 is enough to extact all manifest requires 7zip. once any breaking change in next version of 7zip(assuming it does not support 7z extraction anymore), we must refined the 7z extract function or switch to a helper like 7zip19.00-helper, because manifests of helpers are rolling updates. |
We aren't really using specific versions of helpers though, are we? When a helper is not found, we automatically install the latest version of it. |
This is why I emphasize we need to impose restrictions for helpers. It would be better if we do dependency management, because helpers are dependecies of specific functions of Scoop Core, in fact. The reason users need to use external installation may simply be that they don't want app install by Scoop to override their external installation, then make all helpers like 7zip19.00-helper is enough. in additional, disk space saving are not make sense. Availability of functions is more important than extensibility. We should merge this PR asap, if you still think allowing external installations are necessary, please make a separate PR. |
Description
Test-GitAvailable
: avoid outputs additional error in powershell 5.xCAUSE: git's path are
Test-Path
twice.Scoop/lib/core.ps1
Line 352 in 1d14058
Scoop/lib/core.ps1
Lines 371 to 375 in 1d14058
Get-HelperPath
: fallback git(32bit).CAUSE: git(32bit) is not expected before.
Scoop/lib/core.ps1
Line 370 in 1d14058
Motivation and Context
Relates to #5122
How Has This Been Tested?
Test-GitAvailable
Before:
After:
Get-HelperPath
Before:
After:
Checklist:
develop
branch.