Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] scoop uninstall scoop requires interactive prompt #5734

Open
KoltesDigital opened this issue Nov 22, 2023 · 3 comments
Open

[Bug] scoop uninstall scoop requires interactive prompt #5734

KoltesDigital opened this issue Nov 22, 2023 · 3 comments
Labels

Comments

@KoltesDigital
Copy link

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 KoltesDigital@98eb33b, if you want to go that way.

System details

N/A

Scoop Configuration

N/A

@alkuzad
Copy link

alkuzad commented Dec 27, 2023

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
Copy link
Author

@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
Copy link

alkuzad commented Jan 1, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants