Merge pull request #3007 from matthewbauer/add-user-default

Add default for USER when unset
This commit is contained in:
Eelco Dolstra 2019-07-25 17:46:05 +02:00 committed by GitHub
commit 1fb8e2605a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ if ! [ -e "$self/.reginfo" ]; then
echo "$0: incomplete installer (.reginfo is missing)" >&2
fi
if [ -z "$USER" ]; then
if [ -z "$USER" ] && ! USER=$(id -u -n); then
echo "$0: \$USER is not set" >&2
exit 1
fi