Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix exit status code 7 for the --list option (#212)
The exit status code 7 invoked if there are no pending update when using the `-l/--list` option was not honored because of the `sed` part piped into the call of the `list_package` function. Indeed, piped commands are executed in their own subshell, so the subshell invoked by the `| sed` part is exited with status code 7 instead of the parent subshell (see https://www.gnu.org/software/bash/manual/html_node/Pipelines.html & https://relentlesscoding.com/posts/bash-commands-in-pipelines-subshells/ for more details). Given the very little benefit this `sed` part brings (namely removing the last blank line of the output for purely aesthetic reason), it's not worth wrapping our head too hard on this. Let's just drop it. This commit also adds an info message that there is no update available for the -l/--list option (if that's the case). Fixes #211
- Loading branch information