Unset CDPATH in build script to fix path generation

In https://github.com/kubernetes/kubernetes/issues/52255, it was
determined that if the user has a CDPATH, running `make` will fail. This
is because using the KUBE_ROOT variable results in invalid paths when
the CDPATH environment variable is set.
This commit is contained in:
Mike Arpaia 2018-02-22 01:05:46 -08:00
parent 7d64d30177
commit c5031fafd0
No known key found for this signature in database
GPG Key ID: 257B170C423DE4A0

View File

@ -18,6 +18,10 @@ set -o errexit
set -o nounset
set -o pipefail
# Unset CDPATH so that path interpolation can work correctly
# https://github.com/kubernetes/kubernetes/issues/52255
unset CDPATH
# The root of the build/dist directory
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE}")/../.." && pwd -P)"