mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +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
|
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
|
||||||
|
|
Loading…
Reference in a new issue