From c5031fafd052df98a93651fa93a0c4de382e40e9 Mon Sep 17 00:00:00 2001 From: Mike Arpaia Date: Thu, 22 Feb 2018 01:05:46 -0800 Subject: [PATCH] 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. --- hack/lib/init.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hack/lib/init.sh b/hack/lib/init.sh index d141d168c71..5876d4234e3 100755 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -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)"