mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
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
This commit is contained in:
parent
173f8e2e4a
commit
73b5f1b78c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user