From 3e241ff9e731afc91a3225b041c08760d375cb4f Mon Sep 17 00:00:00 2001 From: Jared Scott Date: Wed, 12 Oct 2016 00:54:11 -0400 Subject: [PATCH] Change $TMPDIR for non-interactive shells This commit changes the way $TMPDIR is set by using `mktemp` rather than a fixed string. --- runcoms/zprofile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runcoms/zprofile b/runcoms/zprofile index d87cb3b0..052d5f98 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -67,8 +67,7 @@ fi # if [[ ! -d "$TMPDIR" ]]; then - export TMPDIR="/tmp/$LOGNAME" - mkdir -p -m 700 "$TMPDIR" + export TMPDIR="$(mktemp -d)" fi TMPPREFIX="${TMPDIR%/}/zsh"