From fe8aaca3203dd73282234ffe208d7c6a2b7d6d3f Mon Sep 17 00:00:00 2001 From: pagedown Date: Fri, 11 Mar 2022 15:42:09 +0800 Subject: [PATCH] Use POSIX LOGNAME environment variable --- shell-integration/ssh/bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/shell-integration/ssh/bootstrap.sh b/shell-integration/ssh/bootstrap.sh index d02ed4a42..7f349be62 100644 --- a/shell-integration/ssh/bootstrap.sh +++ b/shell-integration/ssh/bootstrap.sh @@ -171,6 +171,7 @@ hostname="$HOSTNAME" # ensure $HOME is set [ -z "$HOME" ] && HOME=~ # ensure $USER is set +[ -z "$USER" ] && USER="$LOGNAME" [ -z "$USER" ] && USER="$(command whoami 2> /dev/null)" leading_data=""