Ensure that $TMPDIR exists if defined
This commit is contained in:
parent
6547dcde2a
commit
823e1017d8
|
@ -349,6 +349,11 @@ _sudo() {
|
|||
}
|
||||
|
||||
|
||||
# Ensure that $TMPDIR exists if defined.
|
||||
if [[ -v TMPDIR ]]; then
|
||||
mkdir -m 0700 -p "$TMPDIR"
|
||||
fi
|
||||
|
||||
readonly SCRATCH=$(mktemp -d)
|
||||
finish_cleanup() {
|
||||
rm -rf "$SCRATCH"
|
||||
|
|
Loading…
Reference in a new issue