summary refs log tree commit diff
path: root/src/testsuite/getpid.sh
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2024-04-13 12:00:49 +0200
committerAlexander Barton <alex@barton.de>2024-04-13 12:22:35 +0200
commite3f96d446dd88241a94de51b676fd118d47ab7d7 (patch)
tree3d6edfcba853c71a1024bcb2bfc87ecdb4f0cb29 /src/testsuite/getpid.sh
parent0d42ea7709c786cd9c405cf04395afd0091e580e (diff)
downloadngircd-e3f96d446dd88241a94de51b676fd118d47ab7d7.tar.gz
ngircd-e3f96d446dd88241a94de51b676fd118d47ab7d7.zip
Test suite: Use $USER in getpid.sh when $LOGNAME is not set
The LOGNAME environment variable is not set in GitHub "actions", for
example ...
Diffstat (limited to 'src/testsuite/getpid.sh')
-rwxr-xr-xsrc/testsuite/getpid.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh
index 465def64..85059142 100755
--- a/src/testsuite/getpid.sh
+++ b/src/testsuite/getpid.sh
@@ -23,7 +23,7 @@ if [ -x /usr/bin/pgrep ]; then
 		*)
 			PGREP_FLAGS=""
 	esac
-	exec /usr/bin/pgrep $PGREP_FLAGS -n -u "$LOGNAME" "$1"
+	exec /usr/bin/pgrep $PGREP_FLAGS -n -u "${LOGNAME:-$USER}" "$1"
 fi
 
 # pidof(1) could be a good alternative on elder Linux systems