From 3a6ae0fc6c73963e5f6b0b77f32d219677c840b5 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"