From 998f5ed338e2573d260c1d2bcad89a4f58b6b9ce Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 16 Jun 2025 15:10:23 -0600 Subject: [PATCH] Fix echo command. Handle LOGNAME being empty in situations like a Docker container. --- run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index a20e666..2790b0c 100755 --- a/run.sh +++ b/run.sh @@ -51,6 +51,9 @@ fi cd $DIR sudo="" +if [[ -z $LOGNAME ]]; then + LOGNAME="`whoami`" +fi if [[ $LOGNAME != "root" ]]; then log "Using sudo since user is '$LOGNAME'." sudo="sudo" @@ -70,7 +73,7 @@ if [[ ! `which npm` ]]; then $sudo apt-get install -y npm fi if [[ ! `which curl` ]]; then - echo "- Installing NPM" + echo "- Installing Curl" $sudo apt-get install -y curl fi