Fix using non-absolute paths with mktemp

This commit is contained in:
Salt 2020-09-04 06:26:20 -05:00
parent 156ef9ab54
commit 7c6b704962

View File

@ -102,7 +102,7 @@ build-home() {
# Clone our repo into a temporary directory
log "Cloning repository into temporary directory"
local tmpdir="$(mktemp -d "tmp.$USER.$_name.XXXXXXXX")"
local tmpdir="$(mktemp -d "tmp.$USER.$_name.XXXXXXXX" -p "/tmp")"
trap "cleanup $tmpdir" EXIT
pushd "$tmpdir" > /dev/null 2>&1
log "Cloning into temporary directory: $tmpdir" 2