Don't fail if shellcheck is to be installed manually

This commit is contained in:
Marcin Grzejszczak
2019-04-09 16:55:42 +02:00
parent d4e75dba89
commit 4cfd69816d
2 changed files with 13 additions and 5 deletions

View File

@@ -21,4 +21,8 @@ indent_size = 2
[*.yaml]
indent_style = space
indent_size = 2
indent_size = 2
[*.sh]
indent_style = space
indent_size = 4

View File

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