diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-20 14:02:12 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-20 14:02:12 +0000 |
commit | bd96403da6a1181e46a52be7befade0c00f9e743 (patch) | |
tree | 0f66b119acd03c11e2cad776087889b7827261dc /tests/nix-shell.sh | |
parent | bdc772022766e65fa8ea6d29fff0735529ab47f3 (diff) | |
parent | ec3e20283216374c15843c403363a890221d3fcb (diff) |
Merge remote-tracking branch 'upstream/master' into trustless-remote-builder-simple
Diffstat (limited to 'tests/nix-shell.sh')
-rw-r--r-- | tests/nix-shell.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh index 1228bb04f..7b2be650a 100644 --- a/tests/nix-shell.sh +++ b/tests/nix-shell.sh @@ -59,6 +59,12 @@ output=$($TEST_ROOT/shell.shebang.rb abc ruby) # Test 'nix develop'. nix develop -f shell.nix shellDrv -c bash -c '[[ -n $stdenv ]]' +# Ensure `nix develop -c` preserves stdin +echo foo | nix develop -f shell.nix shellDrv -c cat | grep -q foo + +# Ensure `nix develop -c` actually executes the command if stdout isn't a terminal +nix develop -f shell.nix shellDrv -c echo foo |& grep -q foo + # Test 'nix print-dev-env'. source <(nix print-dev-env -f shell.nix shellDrv) [[ -n $stdenv ]] |