mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Merge pull request #3007 from matthewbauer/add-user-default
Add default for USER when unset
This commit is contained in:
commit
1fb8e2605a
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