Change pushd $d; go ...; popd
to go -C $d ...
Just an annoyance in reading these scripts.
This commit is contained in:
@@ -599,11 +599,7 @@ kube::golang::setup_gomaxprocs() {
|
||||
# when running in a container, please see https://github.com/golang/go/issues/33803
|
||||
if [[ -z "${GOMAXPROCS:-}" ]]; then
|
||||
if ! command -v ncpu >/dev/null 2>&1; then
|
||||
# shellcheck disable=SC2164
|
||||
pushd "${KUBE_ROOT}/hack/tools" >/dev/null
|
||||
go install ./ncpu || echo "Will not automatically set GOMAXPROCS"
|
||||
# shellcheck disable=SC2164
|
||||
popd >/dev/null
|
||||
go -C "${KUBE_ROOT}/hack/tools" install ./ncpu || echo "Will not automatically set GOMAXPROCS"
|
||||
fi
|
||||
if command -v ncpu >/dev/null 2>&1; then
|
||||
GOMAXPROCS=$(ncpu)
|
||||
|
Reference in New Issue
Block a user