fix(install-status): Correctly handle failed installation of apps#4676
fix(install-status): Correctly handle failed installation of apps#4676niheaven merged 11 commits intoScoopInstaller:developfrom
Conversation
|
It's very strange here, the following is running result in my PC (HEAD is 64c2333): |
|
Okay, found it... It's the |
works fine now when re-testing above WARN output msg, reproduced: |
That is, when you install a local manifest with the same name, the bug is happened again? |
|
|
the result should be same, if the app(manifest)name are extracted correctly from any sources. IMO
or maybe just me did not have a complete view of the source code 😂 thanks for your work!👍 |
The update or force update should exit early if the original installation is broken, IMO. That's not 'cos the code I fixed here, but Except that, this should be done, right? 😄 |
|
4887876 to
f36cae5
Compare
|
sure, just some other cases considered by the way. ping me, any progress |
9adef12 to
9331eb8
Compare
|
the manifests(v1|v2\meson.json) consistent with the original reported. PASSED: > scoop install .\v1\meson.json
> scoop list meson
meson *failed*
> scoop install .\v2\meson.json // OR main/meson
> ls (scoop prefix meson) | findstr 'FAILED_INSTALLATION'
> scoop list meson
meson 0.61.1 [C:\Users\HUMOR\Desktop\test\v2\meson.json] // meson 0.61.1 [main]
but > scoop install .\v1\meson.json
Installing 'meson' (0.61.1) [64bit]
Loading meson-0.61.1-64.msi from cache
Checking hash of meson-0.61.1-64.msi ... ok.
Extracting meson-0.61.1-64.msi ... done.
Running installer script...
Linking ~\scoop\apps\meson\current => ~\scoop\apps\meson\0.61.1
Creating shim for 'meson'.
Can't shim 'meson.exe': File doesn't exist.
> scoop cleanup *
Removing meson: 0.61.1File not found - current
Remove-Item : Cannot find path 'C:\Users\HUMOR\Desktop\test\current' because it does not exist.
At C:\Users\HUMOR\scoop\apps\scoop\current\libexec\scoop-cleanup.ps1:58 char:9
+ Remove-Item $leftVersions -ErrorAction Stop -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\HUMOR\Desktop\test\current:String) [Remove-Item], ItemNotFound
Exception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
> scoop uninstall meson
ERROR 'meson' isn't installed correctly.
'meson' was uninstalled. |
|
sure, i noticed that you put meson.json into the |
Signed-off-by: Hsiao-nan Cheung <niheaven@gmail.com>
|
@HUMORCE @rashil2000 The bug is caused by different treatment of A simple test: run |
|
Wow yes, indeed |
|
This is also visible in the CI tests btw, where PS 5.1 shows only the name of files being tested, while PS 7.1 shows the full path of files. |
|
works. but one more thing here, the failed installations can purge(uninstall) via |
Yes, sorry, I eat my words again... Who could understand the guy's thought in #4648 (comment)? lol
|
|
If everything is fine, I'll merge this PR @ScoopInstaller/maintainers |
|
@Calinou Why the 'bug' label? |
The original issue has a |
Think if there is some bug that I've not found😅 We need a |
|
in fact, i do not understand that a failed installation cannot be uninstall by |








Description
core/Confirm-InstallationStatus()marks failed installation and give a warningscoop-cleanupcorrectly cleanup failed installationcore/installed()andinstall/failed()(oh xxxx these two paired functions even are not in same file! Move them tocore)scoop-install/is_installed()and move its functionality into main fileMotivation and Context
Closes #4674
Relates to #4650
How Has This Been Tested?
Just as #4674
Checklist:
I have updated the tests accordingly.(I don't know how to test such functions)