瀏覽代碼

fix issue with /home/manu/tmp

Emmanuel Bouthenot 17 年之前
父節點
當前提交
217dbe5aa8
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      .zsh.d/zshrc

+ 3 - 0
.zsh.d/zshrc

@@ -59,6 +59,9 @@ if [ "$SUDO_USER" -a $UID = 0 ]; then
     # ugly hack : reset some file perms to normal to avoid warnings
     chmod 0644 ~/.zcompdump
     chown $SUDO_USER:$SUDO_USER ~/.zcompdump
+
+    # unsetting TMPDIR when logged as root
+    [ -z "$TMPDIR" ] && unset TMPDIR
 fi
 
 # sourcing extra file