forked from Telodendria/Telodendria
Only use getent if the command can be found.
This commit is contained in:
parent
755d08946a
commit
dd1b26bad8
1 changed files with 1 additions and 1 deletions
|
@ -244,7 +244,7 @@ recipe_patch() {
|
||||||
|
|
||||||
# If the user has not set their DISPLAY_NAME, try to deduce it
|
# If the user has not set their DISPLAY_NAME, try to deduce it
|
||||||
# from their system.
|
# 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)
|
DISPLAY_NAME=$(getent passwd "$USER" | cut -d ':' -f 5 | cut -d ',' -f 1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue