| Summary: | buggy treatment of curly braces after pipe if it should fail | ||
|---|---|---|---|
| Product: | Sisyphus | Reporter: | Ivan Zakharyaschev <imz> |
| Component: | bash3 | Assignee: | placeholder <placeholder> |
| Status: | NEW --- | QA Contact: | qa-sisyphus |
| Severity: | normal | ||
| Priority: | P3 | CC: | glebfm, ldv, obirvalger, placeholder, vseleznv, vt |
| Version: | unstable | ||
| Hardware: | all | ||
| OS: | Linux | ||
A simpler test-case:
$ bash -c 'set -e; set -o pipefail; false | cat; echo end'
$ bash -c 'set -e; set -o pipefail; false | { cat; }; echo end'
end
$ rpm -q bash
bash-3.2.57-alt1
$
Correct behavior:
$ bash4 -c 'set -e; set -o pipefail; false | { cat; }; echo end'
$ bash4 -c 'set -e; set -o pipefail; false | cat; echo end'
$ rpm -q bash4
bash4-4.2.50-alt1.1
$
A simpler test-case:
$ bash -c 'set -e; set -o pipefail; false | { true; }; echo end'
end
$ bash -c 'set -e; set -o pipefail; false | true; echo end'
$
$ bash4 -c 'set -e; set -o pipefail; false | { true; }; echo end'
$ bash4 -c 'set -e; set -o pipefail; false | true; echo end'
$
|
$ rpm -q bash bash-3.2.57-alt1 $ bash -c 'set -e; set -o pipefail; cat </non-existing-file | cat; echo end' bash: /non-existing-file: No such file or directory $ bash -c 'set -e; set -o pipefail; cat </non-existing-file | { cat; }; echo end' bash: /non-existing-file: No such file or directory end $ They should behave the same. In bash4, it's correct: $ rpm -q bash4 bash4-4.2.50-alt1.1 $ bash4 -c 'set -e; set -o pipefail; cat </non-existing-file | { cat; }; echo end' bash4: /non-existing-file: No such file or directory $ bash4 -c 'set -e; set -o pipefail; cat </non-existing-file | cat; echo end' bash4: /non-existing-file: No such file or directory $