Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

fix: `scoop uninstall scoop`

Open hagaigold opened this issue 1 year ago • 4 comments

Description

scoop uninstall scoop is broken

Motivation and Context

Closes #5683

This is a "lazy" fixing of this issue by syncing the uninstall procedure commands from scoop-uninstall.ps1 to uninstall.ps1.
Please See the issue for more context, but a more robust way, is to refactor the code for a single function of uninstalling an app.

How Has This Been Tested?

Install 2 apps (one global) and then scoop uninstall scoop (see attached log)

Checklist:

  • [x] I have read the Contributing Guide.
  • [x] I have ensured that I am targeting the develop branch.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have updated the tests accordingly.
  • [x] I have added an entry in the CHANGELOG.

test-5683.txt

hagaigold avatar Oct 09 '23 19:10 hagaigold

another test - scoop uninstall scoop -g

test-5683-uninstall-global.txt

hagaigold avatar Oct 09 '23 19:10 hagaigold

Do you think it would be better to invoke scoop-uninstall here, instead of invoking all the same functions? This will remove redundancy.

We can just invoke & "$PSScriptRoot\..\libexec\scoop-uninstall.ps1" $apps and pass in the array of all the apps, global and local separately.

rashil2000 avatar Oct 26 '23 07:10 rashil2000

instead of invoking all the same functions?

I agree this is more robust way of doing things.
Because of my limited knowledge of this code base, the intention of this PR was just to fix the issue without too much effort.

Do you think it would be better to invoke scoop-uninstall

if you think this approach making sense (from scoop architecture perspective), I can give it another look.

hagaigold avatar Oct 27 '23 13:10 hagaigold

if you think this approach making sense (from scoop architecture perspective), I can give it another look.

Yes, please go ahead!

rashil2000 avatar Oct 28 '23 04:10 rashil2000