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

Removing persistent data after uninstall app(s) #5711

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Aldo-f
Copy link

@Aldo-f Aldo-f commented Nov 2, 2023

Description

Made some adjustments:

  • Check if app is installed before removing persistent data (Get-AppStatus; only apps that aren't installed get removed)
    • I think think was already the case cause there was a continue app_loop and a throw when the app couldn't get deleted
  • But the uninstall check was necessary for the cleanup-function to be safe.
    • Cleanup persistent data of not yet deleted apps seems vary bad (tested with Brave; it didn't start, or showed it any errors)
  • cleanup-function now needs named params
  • When no installed apps are found, but the -p flag exists, then we are still looping trough the $apps to removing persistent data

Motivation and Context

Closes #5630

How Has This Been Tested?

# Case 1
scoop install brave
scoop uninstall brave
scoop uninstall brave -p

# Case 2.a
scoop install brave
scoop cleanup brave -p # this will not remove the persistent data, 'bc it is still installed
scoop uninstall brave
scoop cleanup brave -p # persistent data is removed

# Case 2.b
scoop install brave
scoop uninstall brave
scoop cleanup * -p  # persistent data is removed of ALL uninstalled apps

Checklist:

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

@Aldo-f
Copy link
Author

Aldo-f commented Nov 5, 2023

I'm thinking about adding my .vscode/launch.json instead of adding the .vscode-directory to the .gitignore.
There is already a extensions.json and a settings.json

details of launch.json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "PowerShell: Interactive Session",
            "type": "PowerShell",
            "request": "launch"
        }
    ]
}

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

Successfully merging this pull request may close these issues.

1 participant