mirror of
https://github.com/NixOS/nix.git
synced 2024-11-29 10:12:28 +00:00
Merge pull request #3007 from matthewbauer/add-user-default
Add default for USER when unset
This commit is contained in:
commit
1fb8e2605a
@ -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 New Issue
Block a user