move unset NIX_STORE_DIR in supplementary-groups.sh

to inside the unshare
This commit is contained in:
cidkidnix 2023-07-13 14:23:24 -05:00
parent 1a13757880
commit adb28d4a26

View file

@ -5,13 +5,13 @@ requireSandboxSupport
if ! command -p -v unshare; then skipTest "Need unshare"; fi
needLocalStore "The test uses --store always so we would just be bypassing the daemon"
unshare --mount --map-root-user bash <<EOF
source common.sh
# Avoid store dir being inside sandbox build-dir
unset NIX_STORE_DIR
unset NIX_STATE_DIR
unshare --mount --map-root-user bash <<EOF
source common.sh
setLocalStore () {
export NIX_REMOTE=\$TEST_ROOT/\$1
mkdir -p \$NIX_REMOTE