From f463d1fdfa32008fc2dbc1476414a46884ccd2db Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Wed, 7 May 2014 16:27:32 -0700 Subject: [PATCH] Use `whoami` instead of $USER If TMPDIR doesn't exist, USER also may not exist. `mkdir` then throws an error after this because TMPDIR is /tmp/, which already exists. --- runcoms/zprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runcoms/zprofile b/runcoms/zprofile index 7118770c..90da4478 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -66,7 +66,7 @@ fi # if [[ ! -d "$TMPDIR" ]]; then - export TMPDIR="/tmp/$USER" + export TMPDIR="/tmp/`whoami`" mkdir -p -m 700 "$TMPDIR" fi