Scoop
Scoop copied to clipboard
[Bug] `scoop uninstall scoop` is broken
Bug Report
Current Behavior
scoop uninstall scoop
is broken since commit 285ffd0
Each specific app uninstall is failing.
Expected Behavior
Uninstall of scoop & all apps.
Possible Solution
In uninstall.ps1
, unlink_current
is failing because of an invalid directory:
function do_uninstall($app, $global) {
$version = Select-CurrentVersion -AppName $app -Global:$global
$dir = versiondir $app $version $global
...
...
# If a junction was used during install, that will have been used
# as the reference directory. Othewise it will just be the version
# directory.
$refdir = unlink_current (appdir $app $global) <<<<=============
While the fix is relatively easy, I wonder if the uninstall app procedure do_uninstall
in uninstall.ps1
, should be used at all.
There is a different procedure in scoop-uninstall.ps1
, that is use when uninstall is called for a single app- scoop uninstall me
.
On top of that, there is uninstall procedure in scoop-update.ps1
.
[updated]
I see ~~at least 2~~ disparities between uninstall.ps1
and scoop-uninstall.ps1
:
-
Invoke-HookScript -HookType 'pre_uninstall' -Manifest $manifest -Arch $architecture
-
rm_startmenu_shortcuts $manifest $global $architecture
-
uninstall_psmodule $manifest $refdir $global
-
Invoke-HookScript -HookType 'post_uninstall' -Manifest $manifest -Arch $architecture