From 73b5f1b78c657b5358e8f1f6933ca147c6ab9bc9 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Tue, 13 Feb 2018 16:35:54 +0200 Subject: [PATCH] hack/lib/init.sh: prevent splitting in 'dirname' result. You can test this change like this: $ mkdir -p '/tmp/foo bar/x' $ cd $(dirname "/tmp/foo bar/x") bash: cd: too many arguments $ cd "$(dirname "/tmp/foo bar/x")" $ pwd /tmp/foo bar --- hack/lib/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lib/init.sh b/hack/lib/init.sh index 5876d4234e3..bd0a5e3fbfc 100755 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -131,7 +131,7 @@ function kube::readlinkdashf { cd "$1" pwd -P else - cd $(dirname "$1") + cd "$(dirname "$1")" local f f=$(basename "$1") if [[ -L "$f" ]]; then