From 4cfd69816df110062802e0170f4b863cd965c25b Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 9 Apr 2019 16:55:42 +0200 Subject: [PATCH] Don't fail if shellcheck is to be installed manually --- .editorconfig | 6 +++++- docs/src/test/bash/build-helper.sh | 12 ++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index 52e6a1af4..b29845b47 100644 --- a/.editorconfig +++ b/.editorconfig @@ -21,4 +21,8 @@ indent_size = 2 [*.yaml] indent_style = space -indent_size = 2 \ No newline at end of file +indent_size = 2 + +[*.sh] +indent_style = space +indent_size = 4 \ No newline at end of file diff --git a/docs/src/test/bash/build-helper.sh b/docs/src/test/bash/build-helper.sh index eb0c854c5..71a8d8e37 100755 --- a/docs/src/test/bash/build-helper.sh +++ b/docs/src/test/bash/build-helper.sh @@ -40,10 +40,14 @@ case $1 in rm -vf -- "${SHELLCHECK_ARCHIVE}" popd else - echo "It seems that automatic installation is not supported on your platform." - echo "Please install shellcheck manually:" - echo " https://github.com/koalaman/shellcheck#installing" - exit 0 + shellcheckInstalled="false" + shellcheck --version && shellcheckInstalled="true" || echo "No shellcheck installed" + if [[ "${shellcheckInstalled}" == "false" ]]; then + echo "It seems that automatic installation is not supported on your platform." + echo "Please install shellcheck manually:" + echo " https://github.com/koalaman/shellcheck#installing" + exit 1 + fi fi ;; run-shellcheck)