Skip to content

Commit 531e830

Browse files
committed
Fix shellcheck errors
1 parent 1d893bb commit 531e830

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

nix/ext/pg_net.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ let
3131
VERSION=$1
3232
3333
# Set defaults, allow environment variable overrides
34-
: ''${NIX_PROFILE:="/var/lib/postgresql/.nix-profile"}
35-
: ''${LIB_DIR:=""}
36-
: ''${EXTENSION_DIR:=""}
34+
: "''${NIX_PROFILE:="/var/lib/postgresql/.nix-profile"}"
35+
: "''${LIB_DIR:=""}"
36+
: "''${EXTENSION_DIR:=""}"
3737
3838
# If LIB_DIR not explicitly set, auto-detect it
3939
if [ -z "$LIB_DIR" ]; then
@@ -42,7 +42,7 @@ let
4242
echo "Starting with link: $CURRENT_LINK"
4343
4444
# Follow first two symlinks to get to the multi-version directory
45-
for i in 1 2; do
45+
for _ in 1 2; do
4646
if [ -L "$CURRENT_LINK" ]; then
4747
NEXT_LINK=$(readlink "$CURRENT_LINK")
4848
echo "Following link: $NEXT_LINK"
@@ -54,7 +54,7 @@ let
5454
echo "Current link is now: $CURRENT_LINK"
5555
fi
5656
done
57-
57+
5858
# The multi-version directory should be the parent of the current link
5959
MULTI_VERSION_DIR=$(dirname "$CURRENT_LINK")
6060
echo "Found multi-version directory: $MULTI_VERSION_DIR"
@@ -76,6 +76,7 @@ let
7676
if [ ! -f "$LIB_DIR/pg_net-$VERSION${postgresql.dlSuffix}" ]; then
7777
echo "Error: Version $VERSION not found in $LIB_DIR"
7878
echo "Available versions:"
79+
#shellcheck disable=SC2012
7980
ls "$LIB_DIR"/pg_net-*${postgresql.dlSuffix} 2>/dev/null | sed 's/.*pg_net-/ /' | sed 's/${postgresql.dlSuffix}$//' || echo " No versions found"
8081
exit 1
8182
fi
@@ -193,7 +194,7 @@ pkgs.buildEnv {
193194
'';
194195

195196
passthru = {
196-
inherit versions numberOfVersions;
197+
inherit versions numberOfVersions switchPgNetVersion;
197198
pname = "${pname}-all";
198199
version =
199200
"multi-" + lib.concatStringsSep "-" (map (v: lib.replaceStrings [ "." ] [ "-" ] v) versions);

0 commit comments

Comments
 (0)