mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
tests/functional/flakes/run: fix tests in macOS devshell
same fix as in 04a47e93f6
This commit is contained in:
parent
0ed67e5b7e
commit
3b0c5ab835
@ -37,11 +37,13 @@ env > $TEST_ROOT/expected-env
|
|||||||
nix run -f shell-hello.nix env > $TEST_ROOT/actual-env
|
nix run -f shell-hello.nix env > $TEST_ROOT/actual-env
|
||||||
# Remove/reset variables we expect to be different.
|
# Remove/reset variables we expect to be different.
|
||||||
# - PATH is modified by nix shell
|
# - PATH is modified by nix shell
|
||||||
|
# - we unset TMPDIR on macOS if it contains /var/folders
|
||||||
# - _ is set by bash and is expected to differ because it contains the original command
|
# - _ is set by bash and is expected to differ because it contains the original command
|
||||||
# - __CF_USER_TEXT_ENCODING is set by macOS and is beyond our control
|
# - __CF_USER_TEXT_ENCODING is set by macOS and is beyond our control
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's/PATH=.*/PATH=.../' \
|
-e 's/PATH=.*/PATH=.../' \
|
||||||
-e 's/_=.*/_=.../' \
|
-e 's/_=.*/_=.../' \
|
||||||
|
-e '/^TMPDIR=\/var\/folders\/.*/d' \
|
||||||
-e '/^__CF_USER_TEXT_ENCODING=.*$/d' \
|
-e '/^__CF_USER_TEXT_ENCODING=.*$/d' \
|
||||||
$TEST_ROOT/expected-env $TEST_ROOT/actual-env
|
$TEST_ROOT/expected-env $TEST_ROOT/actual-env
|
||||||
sort $TEST_ROOT/expected-env | uniq > $TEST_ROOT/expected-env.sorted
|
sort $TEST_ROOT/expected-env | uniq > $TEST_ROOT/expected-env.sorted
|
||||||
|
Loading…
Reference in New Issue
Block a user