forked from lix-project/lix
Merge pull request #6916 from edolstra/tmp-slash
Installer: Don't assume TMPDIR ends in a slash
This commit is contained in:
commit
33aca20616
|
@ -348,8 +348,12 @@ _sudo() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Ensure that $TMPDIR exists if defined.
|
||||
if [[ -n "${TMPDIR:-}" ]] && [[ ! -d "${TMPDIR:-}" ]]; then
|
||||
mkdir -m 0700 -p "${TMPDIR:-}"
|
||||
fi
|
||||
|
||||
readonly SCRATCH=$(mktemp -d "${TMPDIR:-/tmp/}tmp.XXXXXXXXXX")
|
||||
readonly SCRATCH=$(mktemp -d)
|
||||
finish_cleanup() {
|
||||
rm -rf "$SCRATCH"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue