mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
allo overriding docker in shellcheck
This commit is contained in:
parent
a0cd54a7f1
commit
f643388cb4
@ -25,6 +25,9 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
|||||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||||
source "${KUBE_ROOT}/hack/lib/util.sh"
|
source "${KUBE_ROOT}/hack/lib/util.sh"
|
||||||
|
|
||||||
|
# allow overriding docker cli, which should work fine for this script
|
||||||
|
DOCKER="${DOCKER:-docker}"
|
||||||
|
|
||||||
# required version for this script, if not installed on the host we will
|
# required version for this script, if not installed on the host we will
|
||||||
# use the official docker image instead. keep this in sync with SHELLCHECK_IMAGE
|
# use the official docker image instead. keep this in sync with SHELLCHECK_IMAGE
|
||||||
SHELLCHECK_VERSION="0.7.1"
|
SHELLCHECK_VERSION="0.7.1"
|
||||||
@ -105,7 +108,7 @@ if ${HAVE_SHELLCHECK}; then
|
|||||||
shellcheck "${SHELLCHECK_OPTIONS[@]}" "${all_shell_scripts[@]}" || res=$?
|
shellcheck "${SHELLCHECK_OPTIONS[@]}" "${all_shell_scripts[@]}" || res=$?
|
||||||
else
|
else
|
||||||
echo "Using shellcheck ${SHELLCHECK_VERSION} docker image."
|
echo "Using shellcheck ${SHELLCHECK_VERSION} docker image."
|
||||||
docker run \
|
"${DOCKER}" run \
|
||||||
--rm -v "${KUBE_ROOT}:${KUBE_ROOT}" -w "${KUBE_ROOT}" \
|
--rm -v "${KUBE_ROOT}:${KUBE_ROOT}" -w "${KUBE_ROOT}" \
|
||||||
"${SHELLCHECK_IMAGE}" \
|
"${SHELLCHECK_IMAGE}" \
|
||||||
shellcheck "${SHELLCHECK_OPTIONS[@]}" "${all_shell_scripts[@]}" || res=$?
|
shellcheck "${SHELLCHECK_OPTIONS[@]}" "${all_shell_scripts[@]}" || res=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user