Skip to content

Commit 1a8dfc0

Browse files
authored
Merge pull request #12415 from silvanshade/fix-shellcheck-lints
Fix shellcheck lints
2 parents d2425c5 + f90ba3a commit 1a8dfc0

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/functional/flakes/symlink-paths.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ requireGit
66

77
create_flake() {
88
local flakeDir="$1"
9-
createGitRepo $flakeDir
10-
cat > $flakeDir/flake.nix <<EOF
9+
createGitRepo "$flakeDir"
10+
cat > "$flakeDir/flake.nix" <<EOF
1111
{
1212
outputs = { self }: { x = 2; };
1313
}
1414
EOF
15-
git -C $flakeDir add flake.nix
16-
git -C $flakeDir commit -m Initial
15+
git -C "$flakeDir" add flake.nix
16+
git -C "$flakeDir" commit -m Initial
1717
}
1818

1919
test_symlink_points_to_flake() {
@@ -34,15 +34,15 @@ test_symlink_points_to_flake_in_subdir
3434

3535
test_symlink_points_to_dir_in_repo() {
3636
local repoDir="$TEST_ROOT/flake1"
37-
createGitRepo $repoDir
37+
createGitRepo "$repoDir"
3838
mkdir -p "$repoDir/subdir"
39-
cat > $repoDir/subdir/flake.nix <<EOF
39+
cat > "$repoDir/subdir/flake.nix" <<EOF
4040
{
4141
outputs = { self }: { x = 2; };
4242
}
4343
EOF
44-
git -C $repoDir add subdir/flake.nix
45-
git -C $repoDir commit -m Initial
44+
git -C "$repoDir" add subdir/flake.nix
45+
git -C "$repoDir" commit -m Initial
4646
ln -sn "$TEST_ROOT/flake1/subdir" "$TEST_ROOT/flake1_sym"
4747
[[ $(nix eval "$TEST_ROOT/flake1_sym#x") = 2 ]]
4848
rm -rf "$TEST_ROOT/flake1" "$TEST_ROOT/flake1_sym"
@@ -51,22 +51,22 @@ test_symlink_points_to_dir_in_repo
5151

5252
test_symlink_from_repo_to_another() {
5353
local repoDir="$TEST_ROOT/repo1"
54-
createGitRepo $repoDir
55-
echo "Hello" > $repoDir/file
56-
mkdir $repoDir/subdir
57-
cat > $repoDir/subdir/flake.nix <<EOF
54+
createGitRepo "$repoDir"
55+
echo "Hello" > "$repoDir/file"
56+
mkdir "$repoDir/subdir"
57+
cat > "$repoDir/subdir/flake.nix" <<EOF
5858
{
5959
outputs = { self }: { x = builtins.readFile ../file; };
6060
}
6161
EOF
62-
git -C $repoDir add subdir/flake.nix file
63-
git -C $repoDir commit -m Initial
62+
git -C "$repoDir" add subdir/flake.nix file
63+
git -C "$repoDir" commit -m Initial
6464
[[ $(nix eval "$TEST_ROOT/repo1/subdir#x") == \"Hello\\n\" ]]
6565

6666
local repo2Dir="$TEST_ROOT/repo2"
67-
createGitRepo $repo2Dir
67+
createGitRepo "$repo2Dir"
6868
ln -sn "$repoDir/subdir" "$repo2Dir/flake1_sym"
69-
echo "World" > $repo2Dir/file
69+
echo "World" > "$repo2Dir/file"
7070
git -C "$repo2Dir" add flake1_sym file
7171
git -C "$repo2Dir" commit -m Initial
7272
[[ $(nix eval "$repo2Dir/flake1_sym#x") == \"Hello\\n\" ]]

0 commit comments

Comments
 (0)