chiark / gitweb /
dot/shell-rc: Only run tmpdir(1) if we actually found it.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 20 Sep 2017 15:27:44 +0000 (16:27 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 20 Sep 2017 15:52:20 +0000 (16:52 +0100)
dot/shell-rc

index da3d295a8edf0ebfb0229bad5dcf0a990728c309..5c3c3367615b62e4308ec3da7f160bbe73d9d04c 100644 (file)
@@ -329,7 +329,10 @@ path_add "$HOME/bin"
 
 ## Set the temporary directory again.  (A setuid or setgid program may have
 ## unhelpfully forgotten this for us.)
-case ${TMPDIR+t} in t) ;; *) eval $(tmpdir -b) ;; esac
+case ${TMPDIR+t} in
+  t) ;;
+  *) if __mdw_programp tmpdir; then eval $(tmpdir -b); fi ;;
+esac
 
 ## For `root' use -- some simple molly-guards.
 case $(id -u) in