mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +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"
|
cd "$1"
|
||||||
pwd -P
|
pwd -P
|
||||||
else
|
else
|
||||||
cd $(dirname "$1")
|
cd "$(dirname "$1")"
|
||||||
local f
|
local f
|
||||||
f=$(basename "$1")
|
f=$(basename "$1")
|
||||||
if [[ -L "$f" ]]; then
|
if [[ -L "$f" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user