mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
check that TMPDIR is set before using it
This commit is contained in:
parent
9fb7037174
commit
e4aedcd22c
1 changed files with 3 additions and 6 deletions
|
@ -81,13 +81,10 @@ function mktemp
|
|||
exit 1
|
||||
end
|
||||
|
||||
switch "$TMPDIR"
|
||||
case ''
|
||||
set template /tmp/$template
|
||||
case '*/'
|
||||
set template $TMPDIR$template
|
||||
case '*'
|
||||
if set -q TMPDIR[1]
|
||||
set template $TMPDIR/$template
|
||||
else
|
||||
set template /tmp/$template
|
||||
end
|
||||
end
|
||||
set args $args $template
|
||||
|
|
Loading…
Reference in a new issue