-
-
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
perf(scoop): Load libs only once #4839
Conversation
Any idea? @chawyehsu @issaclin32 @rashil2000 ? |
|
What is current behavior? Sorry I haven't my Windows machine nearby, and cannot test if 'git' is not present...
|
|
Yes, I've almost done it, but I've been blocked in my home (damn COVID-19) and the coding process may be a little slower.
It doesn't matter, and the order here is This PR should be done in a few days, I hope 😂 |
Hey, no worries! Personal lives always come first :) |
All done, IMO. |
Will review later today |
Co-authored-by: Rashil Gandhi <[email protected]>
update: ❯ scoop update git
git: 2.35.3.windows.1 -> 2.36.0.windows.1
Updating one outdated app:
Updating 'git' (2.35.3.windows.1 -> 2.36.0.windows.1)
Downloading new version
Loading PortableGit-2.36.0-64-bit.7z.exe from cache
Checking hash of PortableGit-2.36.0-64-bit.7z.exe ... ok.
Uninstalling 'git' (2.35.3.windows.1)
Removing shim 'git.shim'.
Removing shim 'git.exe'.
Removing shim 'gitk.shim'.
Removing shim 'gitk.exe'.
Removing shim 'git-gui.shim'.
Removing shim 'git-gui.exe'.
Removing shim 'tig.shim'.
Removing shim 'tig.exe'.
Removing shim 'git-bash.shim'.
Removing shim 'git-bash.exe'.
Unlinking ~\scoop\apps\git\current
Installing 'git' (2.36.0.windows.1) [64bit]
Loading PortableGit-2.36.0-64-bit.7z.exe from cache
Extracting dl.7z ... done.
Linking ~\scoop\apps\git\current => ~\scoop\apps\git\2.36.0.windows.1
Creating shim for 'git'.
Creating shim for 'gitk'.
Creating shim for 'git-gui'.
Creating shim for 'tig'.
Creating shim for 'git-bash'.
Creating shortcut for Git Bash (git-bash.exe)
Creating shortcut for Git GUI (git-gui.exe)
ConvertToPrettyJson: C:\Users\HUMOR\scoop\apps\scoop\current\lib\manifest.ps1:48
Line |
48 | $file_content = $info | ConvertToPrettyJson
| ~~~~~~~~~~~~~~~~~~~
| The term 'ConvertToPrettyJson' is not recognized as a name of a cmdlet, function, script file, or
| executable program. Check the spelling of the name, or if a path was included, verify that the path is
| correct and try again.
MethodInvocationException: C:\Users\HUMOR\scoop\apps\scoop\current\lib\manifest.ps1:49
Line |
49 | [System.IO.File]::WriteAllLines("$dir\install.json", $file_conten …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "WriteAllLines" with "2" argument(s): "Value cannot be null. (Parameter 'contents')"
'git' (2.36.0.windows.1) was installed successfully!
Notes
-----
Set Git Credential Manager Core by running: "git config --global credential.helper manager-core" fresh install: ❯ scoop install git
Installing 'git' (2.36.0.windows.1) [64bit]
Loading PortableGit-2.36.0-64-bit.7z.exe from cache
Checking hash of PortableGit-2.36.0-64-bit.7z.exe ... ok.
Extracting dl.7z ... done.
Linking ~\scoop\apps\git\current => ~\scoop\apps\git\2.36.0.windows.1
Creating shim for 'git'.
Creating shim for 'gitk'.
Creating shim for 'git-gui'.
Creating shim for 'tig'.
Creating shim for 'git-bash'.
Creating shortcut for Git Bash (git-bash.exe)
Creating shortcut for Git GUI (git-gui.exe)
'git' (2.36.0.windows.1) was installed successfully!
Notes
-----
Set Git Credential Manager Core by running: "git config --global credential.helper manager-core" |
Got the same error after this update. |
Update and try again @HUMORCE @lewis-yeung |
Description
Only import libs once, and necessary libs (e.g.
core.ps1
,buckets.ps1
,commands.ps1
andhelp.ps1
) are sourced inbin\scoop.ps1
.Also refactor
bin\scoop.ps1
file and fix help system. Nowscoop help <cmd>
,scoop <cmd> --help
,scoop <cmd> -h
,scoop <cmd> /?
give subcommand help, andscoop
,scoop help
,scoop --help
,scoop -h
,scoop /?
give scoop help.Closes #3418
How Has This Been Tested?
Tests are passed, and all command w/o args haven't error. More tests (subcommands') are needed.
Checklist: