Allow ramdisk-create to run without $USER set

It's possible this is run form an environment where $USER isn't set,
properly fallback to whoami in this case.

Change-Id: I1181f714c3c456ee264b34d282bac5c0adb67a0e
This commit is contained in:
Gregory Haynes 2016-08-19 16:04:32 +00:00
parent c20a42051a
commit 6180d82f14

View File

@ -11,6 +11,8 @@ set -o pipefail
[ -n "$TARGET_ROOT" ] [ -n "$TARGET_ROOT" ]
USER=${USER:-$(whoami)}
source $_LIB/img-functions source $_LIB/img-functions
IMAGE_PATH=$(readlink -f $IMAGE_NAME) IMAGE_PATH=$(readlink -f $IMAGE_NAME)