Skip to content

Commit 1cf8001

Browse files
authored
Merge pull request kubernetes#74449 from xichengliudui/fix190223
make more of the shell pass lints
2 parents 6a29f8c + b83b83f commit 1cf8001

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

cluster/kube-up.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set -o errexit
2424
set -o nounset
2525
set -o pipefail
2626

27-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
27+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2828

2929
if [ -f "${KUBE_ROOT}/cluster/env.sh" ]; then
3030
source "${KUBE_ROOT}/cluster/env.sh"
@@ -84,6 +84,7 @@ elif [[ "${validate_result}" == "2" ]]; then
8484
fi
8585

8686
if [[ "${ENABLE_PROXY:-}" == "true" ]]; then
87+
# shellcheck disable=SC1091
8788
. /tmp/kube-proxy-env
8889
echo ""
8990
echo "*** Please run the following to add the kube-apiserver endpoint to your proxy white-list ***"

cluster/kube-util.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# cluster/${KUBERNETES_PROVIDER}/util.sh where KUBERNETES_PROVIDER, if unset,
1919
# will use its default value (gce).
2020

21-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
21+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2222

2323
source "${KUBE_ROOT}/cluster/skeleton/util.sh"
2424

@@ -34,9 +34,8 @@ fi
3434
# this is a list of the _names_ of the variables, not the value of the
3535
# variables. Providers can add variables to be appended to kube-env.
3636
# (see `build-kube-env`).
37-
PROVIDER_VARS=""
3837

3938
PROVIDER_UTILS="${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
40-
if [ -f ${PROVIDER_UTILS} ]; then
39+
if [ -f "${PROVIDER_UTILS}" ]; then
4140
source "${PROVIDER_UTILS}"
4241
fi

cluster/kubectl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ set -o pipefail
3030
# echo "-=-=-=-=-=-=-=-=-=-="
3131

3232

33-
KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE}")/..}
33+
KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE[0]}")/..}
3434
source "${KUBE_ROOT}/cluster/kube-util.sh"
3535
source "${KUBE_ROOT}/cluster/clientbin.sh"
3636

hack/.shellcheck_failures

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
./cluster/images/conformance/run_e2e.sh
2222
./cluster/juju/prereqs/ubuntu-juju.sh
2323
./cluster/juju/util.sh
24-
./cluster/kube-up.sh
25-
./cluster/kube-util.sh
26-
./cluster/kubectl.sh
2724
./cluster/kubemark/gce/config-default.sh
2825
./cluster/kubemark/iks/config-default.sh
2926
./cluster/kubemark/util.sh

0 commit comments

Comments
 (0)