test/flakes/follow-paths.sh: Quote
Co-authored-by: Alex Ameen <alex.ameen.tx@gmail.com>
This commit is contained in:
parent
20d9c672d1
commit
75243c9693
|
@ -146,8 +146,8 @@ EOF
|
||||||
|
|
||||||
git -C $flakeFollowsA add flake.nix
|
git -C $flakeFollowsA add flake.nix
|
||||||
|
|
||||||
nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid'"
|
nix flake lock "$flakeFollowsA" 2>&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid'"
|
||||||
nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid2'"
|
nix flake lock "$flakeFollowsA" 2>&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid2'"
|
||||||
|
|
||||||
# Now test follow path overloading
|
# Now test follow path overloading
|
||||||
# This tests a lockfile checking regression https://github.com/NixOS/nix/pull/8819
|
# This tests a lockfile checking regression https://github.com/NixOS/nix/pull/8819
|
||||||
|
@ -169,18 +169,18 @@ nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override fo
|
||||||
# error: input 'B/D' follows a non-existent input 'B/C/D'
|
# error: input 'B/D' follows a non-existent input 'B/C/D'
|
||||||
#
|
#
|
||||||
# Note that for `B` to resolve its follow for `D`, it needs `C/D`, for which it needs to resolve the follow on `C` first.
|
# Note that for `B` to resolve its follow for `D`, it needs `C/D`, for which it needs to resolve the follow on `C` first.
|
||||||
flakeFollowsOverloadA=$TEST_ROOT/follows/overload/flakeA
|
flakeFollowsOverloadA="$TEST_ROOT/follows/overload/flakeA"
|
||||||
flakeFollowsOverloadB=$TEST_ROOT/follows/overload/flakeA/flakeB
|
flakeFollowsOverloadB="$TEST_ROOT/follows/overload/flakeA/flakeB"
|
||||||
flakeFollowsOverloadC=$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC
|
flakeFollowsOverloadC="$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC"
|
||||||
flakeFollowsOverloadD=$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC/flakeD
|
flakeFollowsOverloadD="$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC/flakeD"
|
||||||
|
|
||||||
# Test following path flakerefs.
|
# Test following path flakerefs.
|
||||||
createGitRepo $flakeFollowsOverloadA
|
createGitRepo "$flakeFollowsOverloadA"
|
||||||
mkdir -p $flakeFollowsOverloadB
|
mkdir -p "$flakeFollowsOverloadB"
|
||||||
mkdir -p $flakeFollowsOverloadC
|
mkdir -p "$flakeFollowsOverloadC"
|
||||||
mkdir -p $flakeFollowsOverloadD
|
mkdir -p "$flakeFollowsOverloadD"
|
||||||
|
|
||||||
cat > $flakeFollowsOverloadD/flake.nix <<EOF
|
cat > "$flakeFollowsOverloadD/flake.nix" <<EOF
|
||||||
{
|
{
|
||||||
description = "Flake D";
|
description = "Flake D";
|
||||||
inputs = {};
|
inputs = {};
|
||||||
|
@ -188,7 +188,7 @@ cat > $flakeFollowsOverloadD/flake.nix <<EOF
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > $flakeFollowsOverloadC/flake.nix <<EOF
|
cat > "$flakeFollowsOverloadC/flake.nix" <<EOF
|
||||||
{
|
{
|
||||||
description = "Flake C";
|
description = "Flake C";
|
||||||
inputs.D.url = "path:./flakeD";
|
inputs.D.url = "path:./flakeD";
|
||||||
|
@ -196,7 +196,7 @@ cat > $flakeFollowsOverloadC/flake.nix <<EOF
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > $flakeFollowsOverloadB/flake.nix <<EOF
|
cat > "$flakeFollowsOverloadB/flake.nix" <<EOF
|
||||||
{
|
{
|
||||||
description = "Flake B";
|
description = "Flake B";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
@ -210,7 +210,7 @@ cat > $flakeFollowsOverloadB/flake.nix <<EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# input B/D should be able to be found...
|
# input B/D should be able to be found...
|
||||||
cat > $flakeFollowsOverloadA/flake.nix <<EOF
|
cat > "$flakeFollowsOverloadA/flake.nix" <<EOF
|
||||||
{
|
{
|
||||||
description = "Flake A";
|
description = "Flake A";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
@ -224,9 +224,9 @@ cat > $flakeFollowsOverloadA/flake.nix <<EOF
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
git -C $flakeFollowsOverloadA add flake.nix flakeB/flake.nix \
|
git -C "$flakeFollowsOverloadA" add flake.nix flakeB/flake.nix \
|
||||||
flakeB/flakeC/flake.nix flakeB/flakeC/flakeD/flake.nix
|
flakeB/flakeC/flake.nix flakeB/flakeC/flakeD/flake.nix
|
||||||
|
|
||||||
nix flake metadata $flakeFollowsOverloadA
|
nix flake metadata "$flakeFollowsOverloadA"
|
||||||
nix flake update $flakeFollowsOverloadA
|
nix flake update "$flakeFollowsOverloadA"
|
||||||
nix flake lock $flakeFollowsOverloadA
|
nix flake lock "$flakeFollowsOverloadA"
|
||||||
|
|
Loading…
Reference in a new issue