]> git.sev.monster Git - dotfiles.git/commitdiff
do not hardcode /tmp in .zprofile
authorsev <git@sev.monster>
Tue, 12 May 2020 00:32:17 +0000 (19:32 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:39 +0000 (16:27 -0500)
base/.zprofile

index 425a48ced70f4aafdd9060fee8bc95f4059ad69d..aa571635b152fe51b72e742801e77968e832a80c 100644 (file)
@@ -1,10 +1,11 @@
 #XXX: ensure we override /etc/profile, gets loaded after .zshenv
 source ~/.zshenv
 
-t="/tmp/home-$LOGNAME"
+t="${TMPDIR:-/tmp}/home-$LOGNAME"
 h="$HOME/tmp"
 if [[ ! -e "$t" ]] {
        mkdir -m 700 "$t" > /dev/null 2>&1
+       #TODO: check if dir exists after mkdir
 }
 #allow opaque entries to override
 if [[ ! -e "$h" ]] {
This page took 0.033134 seconds and 4 git commands to generate.