Skip to content

Commit

Permalink
fix: set $USER if missing
Browse files Browse the repository at this point in the history
$USER is not available in sh which is used by cron.
  • Loading branch information
dgibbs64 committed Sep 25, 2023
1 parent 753eb2a commit 4a02dfd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lgsm/modules/core_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,11 @@ if [ ! -d "${lockdir}" ]; then
mkdir -p "${lockdir}"
fi

# if $USER id missing set to whoami
if [ -z "${USER}" ]; then
USER="$(whoami)"
fi

# Calls on-screen messages (bootstrap)
core_messages.sh

Expand Down

0 comments on commit 4a02dfd

Please sign in to comment.