refactor: First step on abort
function deprication
#3748
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented in Shovel. Meta issues: Ash258#46, Ash258#21
Relates to #3936 and #4135.
abort
function is causing lots of troubles for user and is used across whole codebase.Main problem is update/installation of multiple applications.
scoop install man1 man2
. Currently if installtion ofman1
fail, thenman2
is not installed and you need to install it manually. But without abort, and proper try/catching, throwing it is easy to recover from failed installation and continue withman2
installationThis PR is first step of whole process of removing/limiting usage of it.
I added new function, which has same behaviour, but it support pipeline and is verb-noun, because sometimes you can simply exit whole execution.
I will deprecate other usage of
abort
in other PRs (except decompress; I will leave it to @niheaven since he wrote almost all of it) Additional removal of other abort references will be harder as there is need to reimplement all functions to throw exception instead of aborting and then try catching.This is just fast patch of few simple abort usage, which could be fixed easily.