-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR fixes errror propagation. At the moment commands like `uenv run store.squashfs -- my_cmd` will always look successful, independent of the status of `my_cmd`. With this PR it will be possible to propaget the error, and chain commands in the shell with `&&` or `||`. There is a tight integration of `uenv-impl` and the `uenv` function, because `uenv-impl` sets variables that will be returned from the `uenv` function. This is not great, but I could not figure out a way how else I could make it happen. Here are two examples that would work with the suggested changes: ```bash if uenv run store.squashfs -- false ; then echo "Success status" else echo "Failure status" ``` and also ```bash if uenv start store.squashfs ; then echo "Success status" else echo "Failure status" fi ``` The latter will have the exit status of the last run command, which is the default behaviour for subshells, where the last command's exit status defines the subshell's exit status.
- Loading branch information
1 parent
eeb16f9
commit 9dc2934
Showing
2 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters