housekeeping: shellcheck for tests/functional/bash-profile.sh

This commit is contained in:
Cameron Dart 2024-06-03 13:18:42 -07:00 committed by John Ericson
parent 394286cf5e
commit 7738b295e5
2 changed files with 3 additions and 4 deletions

View file

@ -507,7 +507,6 @@
''^scripts/install-nix-from-closure\.sh$''
''^scripts/install-systemd-multi-user\.sh$''
''^src/nix/get-env\.sh$''
''^tests/functional/bash-profile\.sh$''
''^tests/functional/binary-cache-build-remote\.sh$''
''^tests/functional/binary-cache\.sh$''
''^tests/functional/brotli\.sh$''

View file

@ -2,10 +2,10 @@
source common.sh
sed -e "s|@localstatedir@|$TEST_ROOT/profile-var|g" -e "s|@coreutils@|$coreutils|g" < ../../scripts/nix-profile.sh.in > $TEST_ROOT/nix-profile.sh
sed -e "s|@localstatedir@|$TEST_ROOT/profile-var|g" -e "s|@coreutils@|$coreutils|g" < ../../scripts/nix-profile.sh.in > "$TEST_ROOT"/nix-profile.sh
user=$(whoami)
rm -rf $TEST_HOME $TEST_ROOT/profile-var
mkdir -p $TEST_HOME
rm -rf "$TEST_HOME" "$TEST_ROOT/profile-var"
mkdir -p "$TEST_HOME"
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh; set"
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh" # test idempotency