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

Better error handling during uninstallation. #2079

Conversation

excitoon
Copy link
Contributor

@excitoon excitoon commented Mar 2, 2018

If one uninstalls more than one application and have an error, she will receive pretty random behaviour - scoop will either stops (skipping other applications) or continue to uninstall the current. This is so because continue doesn't works with pipes and some continue were supposed to exit current iteration of nested loop. When one calls continue from For-Each, PowerShell simply exits For-Each (the same effect as if it was break:

PS C:\Users\Chebotarev_V\scoop\apps\scoop\current> @(1,2,3,4) | % { echo $_; continue }
1
PS C:\Users\Chebotarev_V\scoop\apps\scoop\current> foreach($_ in @(1,2,3,4)) { echo $_; continue; }
1
2
3
4

@excitoon excitoon force-pushed the better-error-handling-during-uninstallation branch from 8338358 to 87ba237 Compare March 11, 2018 08:30
@excitoon
Copy link
Contributor Author

excitoon commented Mar 11, 2018

@rrelmy Done.

@rasa rasa added review-needed Asks for review of these changes and removed solve-conflicts labels Mar 12, 2018
Copy link
Member

@rasa rasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but untested)

@r15ch13 r15ch13 merged commit 8e1de57 into ScoopInstaller:master May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-needed Asks for review of these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants