From b77b9432c45d6f38c0ad6d9021afb4dd91f163e4 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sat, 13 Apr 2024 16:04:29 +0200 Subject: [PATCH] Test suite: Correctly test for LOGNAME and USER --- src/testsuite/getpid.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh index 3cc186e1..7a3dbe37 100755 --- a/src/testsuite/getpid.sh +++ b/src/testsuite/getpid.sh @@ -23,7 +23,7 @@ if [ -x /usr/bin/pgrep ]; then *) PGREP_FLAGS="" esac - if [ -n "$LOGNAME" ] || [ -n "$USER" ]; then + if [ -n "${LOGNAME:-}" ] || [ -n "${USER:-}" ]; then # Try to narrow the search down to the current user ... exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1" else -- 2.39.2