Merge pull request #99019 from BenTheElder/unit-test-cluster-macos

portably configure tempdir in configure-helper.sh
This commit is contained in:
Kubernetes Prow Robot 2021-02-12 02:06:47 -08:00 committed by GitHub
commit 474118b0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -608,7 +608,7 @@ function append_or_replace_prefixed_line {
local -r prefix="${2:-}"
local -r suffix="${3:-}"
local -r dirname=$(dirname "${file}")
local -r tmpfile=$(mktemp -t filtered.XXXX --tmpdir="${dirname}")
local -r tmpfile=$(mktemp "${dirname}/filtered.XXXX")
touch "${file}"
awk -v pfx="${prefix}" 'substr($0,1,length(pfx)) != pfx { print }' "${file}" > "${tmpfile}"