mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
shellcheck fix: tests/functional/nested-sandboxing/command.sh
This commit is contained in:
parent
1a71c1ef9f
commit
794723142b
2 changed files with 7 additions and 5 deletions
|
|
@ -106,7 +106,6 @@
|
|||
enable = true;
|
||||
excludes = [
|
||||
# We haven't linted these files yet
|
||||
''^tests/functional/nested-sandboxing/command\.sh$''
|
||||
''^tests/functional/nix-build\.sh$''
|
||||
''^tests/functional/nix-channel\.sh$''
|
||||
''^tests/functional/nix-collect-garbage-d\.sh$''
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
# shellcheck shell=bash
|
||||
set -eu -o pipefail
|
||||
|
||||
export NIX_BIN_DIR=$(dirname $(type -p nix))
|
||||
NIX_BIN_DIR=$(dirname "$(type -p nix)")
|
||||
export NIX_BIN_DIR
|
||||
# TODO Get Nix and its closure more flexibly
|
||||
export EXTRA_SANDBOX="/nix/store $(dirname $NIX_BIN_DIR)"
|
||||
EXTRA_SANDBOX="/nix/store $(dirname "$NIX_BIN_DIR")"
|
||||
export EXTRA_SANDBOX
|
||||
|
||||
badStoreUrl () {
|
||||
local altitude=$1
|
||||
echo $TEST_ROOT/store-$altitude
|
||||
echo "$TEST_ROOT"/store-"$altitude"
|
||||
}
|
||||
|
||||
goodStoreUrl () {
|
||||
local altitude=$1
|
||||
echo $("badStoreUrl" "$altitude")?store=/foo-$altitude
|
||||
echo "$("badStoreUrl" "$altitude")"?store=/foo-"$altitude"
|
||||
}
|
||||
|
||||
# The non-standard sandbox-build-dir helps ensure that we get the same behavior
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue