Ensure that $TMPDIR exists if defined
This commit is contained in:
parent
6547dcde2a
commit
823e1017d8
1 changed files with 5 additions and 0 deletions
|
@ -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