mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue