From 8a36cf4422a094ba1b60a5ad8afaf632ac8236ae Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Tue, 30 Sep 2025 19:58:11 -0700 Subject: [PATCH] shellcheck fix: tests/functional/readfile-context.sh --- maintainers/flake-module.nix | 1 - tests/functional/readfile-context.sh | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/maintainers/flake-module.nix b/maintainers/flake-module.nix index 24d2e08d4..57e0f9997 100644 --- a/maintainers/flake-module.nix +++ b/maintainers/flake-module.nix @@ -106,7 +106,6 @@ enable = true; excludes = [ # We haven't linted these files yet - ''^tests/functional/readfile-context\.sh$'' ''^tests/functional/recursive\.sh$'' ''^tests/functional/referrers\.sh$'' ''^tests/functional/remote-store\.sh$'' diff --git a/tests/functional/readfile-context.sh b/tests/functional/readfile-context.sh index cb9ef6234..effe483dc 100755 --- a/tests/functional/readfile-context.sh +++ b/tests/functional/readfile-context.sh @@ -9,12 +9,12 @@ clearStore outPath=$(nix-build --no-out-link readfile-context.nix) # Set a GC root. -ln -s $outPath "$NIX_STATE_DIR/gcroots/foo" +ln -s "$outPath" "$NIX_STATE_DIR/gcroots/foo" # Check that file exists. -[ "$(cat $(cat $outPath))" = "Hello World!" ] +[ "$(cat "$(cat "$outPath")")" = "Hello World!" ] nix-collect-garbage # Check that file still exists. -[ "$(cat $(cat $outPath))" = "Hello World!" ] +[ "$(cat "$(cat "$outPath")")" = "Hello World!" ]