Add default for USER when unset
uses $(id -u -n) when USER is unset, this is needed on some weird setups in Docker. Fixes #971
This commit is contained in:
parent
b640f69a4d
commit
c82a856b36
|
@ -12,7 +12,7 @@ if ! [ -e "$self/.reginfo" ]; then
|
||||||
echo "$0: incomplete installer (.reginfo is missing)" >&2
|
echo "$0: incomplete installer (.reginfo is missing)" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$USER" ]; then
|
if [ -z "$USER" ] && ! USER=$(id -u -n); then
|
||||||
echo "$0: \$USER is not set" >&2
|
echo "$0: \$USER is not set" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue