From dd1b26bad8e560f5e5d73d23d0d157b4ee841c6a Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Wed, 1 Mar 2023 03:09:46 +0000 Subject: [PATCH] Only use getent if the command can be found. --- tools/bin/td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bin/td b/tools/bin/td index 66cb796..dad09c6 100644 --- a/tools/bin/td +++ b/tools/bin/td @@ -244,7 +244,7 @@ recipe_patch() { # If the user has not set their DISPLAY_NAME, try to deduce it # from their system. - if [ -z "$DISPLAY_NAME" ]; then + if [ -z "$DISPLAY_NAME" ] && which getent > /dev/null 2>&1; then DISPLAY_NAME=$(getent passwd "$USER" | cut -d ':' -f 5 | cut -d ',' -f 1) fi