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:
Ismo Puustinen 2018-02-13 16:35:54 +02:00
parent 173f8e2e4a
commit 73b5f1b78c

View File

@ -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