Scoop
Scoop copied to clipboard
[Bug] `scoop uninstall scoop` requires interactive prompt
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
- A switch param like
-y
to avoid prompt. This would require the least changes. -
CmdletBinding
and$PSCmdlet.ShouldProcess
. This would be better regarding PowerShell, sadly defaults to Yes. I've committed it at https://github.com/KoltesDigital/Scoop/commit/98eb33bb45e958305f7e5d724399e8f621719b87, if you want to go that way.
System details
N/A
Scoop Configuration
N/A
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 :)
@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 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