ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.37k stars 1.37k forks source link

[Bug] `scoop uninstall scoop` requires interactive prompt #5734

Open KoltesDigital opened 7 months ago

KoltesDigital commented 7 months ago

Bug Report

Current Behavior

scoop uninstall scoop asks for confirmation using Read-Host, which can't be piped.

Expected Behavior

scoop uninstall scoop should be possible with no user interaction.

Additional context/output

Not that I dislike Scoop ;) I'm just automatizing Scoop installation (within another framework...) and it's good to have a non-interactive uninstall script.

Possible Solution

System details

N/A

Scoop Configuration

N/A

alkuzad commented 6 months ago

what about remove-item -recursive ~/scoop?

Technically scoop uninstall scoop is just a wrapper for running bin\uninstall.ps1, which is a different script and serves a different role. Copy it, remove the check and run :)

KoltesDigital commented 6 months ago

@alkuzad thanks. Your first suggestion does not seem to fully uninstall (e.g. remove env vars) so I'll just give the second one a try. I should have read further! Consider documenting this trick, I shouldn't be alone to ask for it.

alkuzad commented 6 months ago

@alkuzad thanks. Your first suggestion does not seem to fully uninstall (e.g. remove env vars) so I'll just give the second one a try. I should have read further! Consider documenting this trick, I shouldn't be alone to ask for it.

yeah technically it does leave some stuff behind (PATH is less problematic, but shortcuts in start menu can be). Scoop is oriented for people to use directly, hence probably the missing stuff. The -y param would be nice but it would be added to uninstall.ps1 which should be used directly then