mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 07:16:17 +02:00
install: only create TMPDIR if missing
This commit is contained in:
parent
823e1017d8
commit
0bf52b73f4
1 changed files with 2 additions and 3 deletions
|
@ -348,10 +348,9 @@ _sudo() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Ensure that $TMPDIR exists if defined.
|
# Ensure that $TMPDIR exists if defined.
|
||||||
if [[ -v TMPDIR ]]; then
|
if [[ -n "${TMPDIR:-}" ]] && [[ ! -d "${TMPDIR:-}" ]]; then
|
||||||
mkdir -m 0700 -p "$TMPDIR"
|
mkdir -m 0700 -p "${TMPDIR:-}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
readonly SCRATCH=$(mktemp -d)
|
readonly SCRATCH=$(mktemp -d)
|
||||||
|
|
Loading…
Reference in a new issue