check that TMPDIR is set before using it

This commit is contained in:
Kurtis Rader 2017-07-04 13:20:46 -07:00
parent 9fb7037174
commit e4aedcd22c

View file

@ -81,13 +81,10 @@ function mktemp
exit 1 exit 1
end end
switch "$TMPDIR" if set -q TMPDIR[1]
case ''
set template /tmp/$template
case '*/'
set template $TMPDIR$template
case '*'
set template $TMPDIR/$template set template $TMPDIR/$template
else
set template /tmp/$template
end end
end end
set args $args $template set args $args $template