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

Bash as shell? #2

Closed
lslvr opened this issue Nov 3, 2019 · 1 comment
Closed

Bash as shell? #2

lslvr opened this issue Nov 3, 2019 · 1 comment
Assignees
Labels
discussion-feedback Issues to discuss users feedback on this software.

Comments

@lslvr
Copy link
Member

lslvr commented Nov 3, 2019

All tools use a POSIX compliant shell (/bin/sh) as the command interpreter. The POSIX standard lacks a very useful bash feature: set -o pipefail. That makes a pipe fail if any of its commands fail. OTOH, the POSIX standard states that the pipe's exit code shall be that of the rightmost command. This seems inconsistent if any of the other commands [in the pipeline] fail.

@lslvr lslvr self-assigned this Nov 3, 2019
@UriHerrera UriHerrera added the discussion-feedback Issues to discuss users feedback on this software. label Nov 5, 2019
@lslvr
Copy link
Member Author

lslvr commented Apr 17, 2020

The following may be a bash bug:

set -eo pipefail
shopt -s inherit_errexit

echo $(false)
echo "I'm a bug."

When bash executes this code, it prints I'm a bug.. This makes bash useless for solving this issue.

@lslvr lslvr closed this as completed Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion-feedback Issues to discuss users feedback on this software.
Projects
None yet
Development

No branches or pull requests

2 participants