Ensure that $TMPDIR exists if defined

This commit is contained in:
Eelco Dolstra 2022-08-17 21:47:01 +02:00
parent 6547dcde2a
commit 823e1017d8

View file

@ -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) readonly SCRATCH=$(mktemp -d)
finish_cleanup() { finish_cleanup() {
rm -rf "$SCRATCH" rm -rf "$SCRATCH"