Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Different behaviour from nix-shell wrt pipefail #28

Closed
mmilata opened this issue Feb 18, 2023 · 1 comment
Closed

Different behaviour from nix-shell wrt pipefail #28

mmilata opened this issue Feb 18, 2023 · 1 comment

Comments

@mmilata
Copy link

mmilata commented Feb 18, 2023

nix-shell seems to have pipefail set (set -o pipefail) while cached-nix-shell does not:

$ nix-shell -p moreutils --run "false" ; echo $?
1
$ nix-shell -p moreutils --run "false | ts -s" ; echo $?
1
$ cached-nix-shell -p moreutils --run "false" ; echo $?
1
$ cached-nix-shell -p moreutils --run "false | ts -s" ; echo $?
0
@xzfc
Copy link
Owner

xzfc commented May 24, 2023

Added preserving of some shellopts/bashopts that are touched by stdenv/original nix-shell. I think these should be enough since nix expressions generally don't change it beyond what stdenv/setup.sh does, but if anything, we could add code to handle every possible option.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants