fix potential wrong _USER value

"id -u" gives then uid not a the name.
https://man7.org/linux/man-pages/man1/id.1.html

Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>
This commit is contained in:
Matthieu Crapet 2021-01-02 09:58:34 +01:00
parent d227695778
commit 312915b4b3

2
tomb
View File

@ -210,7 +210,7 @@ _whoami() {
# Set username from UID or environment
_USER=$SUDO_USER
[[ -z $_USER ]] && { _USER=$USERNAME }
[[ -z $_USER ]] && { _USER=$(id -u) }
[[ -z $_USER ]] && { _USER=$(id -un) }
[[ -z $_USER ]] && {
_failure "Failing to identify the user who is calling us" }