mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +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
|
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