fix: Output gitleaks version (#2363)

This commit is contained in:
Ross Smith II 2022-01-20 12:06:10 -08:00 committed by GitHub
parent e036e91c43
commit ef8f202ea2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,7 @@ BuildLinterVersions() {
if [[ ${LINTER} == "arm-ttk" ]]; then if [[ ${LINTER} == "arm-ttk" ]]; then
# Need specific command for ARM # Need specific command for ARM
GET_VERSION_CMD="$(grep -iE 'version' "/usr/bin/arm-ttk" | xargs 2>&1)" GET_VERSION_CMD="$(grep -iE 'version' "/usr/bin/arm-ttk" | xargs 2>&1)"
elif [[ ${LINTER} == "bash-exec" ]] || [[ ${LINTER} == "gherkin-lint" ]] || [[ ${LINTER} == "gitleaks" ]]; then elif [[ ${LINTER} == "bash-exec" ]] || [[ ${LINTER} == "gherkin-lint" ]]; then
# Need specific command for Protolint and editorconfig-checker # Need specific command for Protolint and editorconfig-checker
GET_VERSION_CMD="$(echo "--version not supported")" GET_VERSION_CMD="$(echo "--version not supported")"
elif [[ ${LINTER} == "lintr" ]]; then elif [[ ${LINTER} == "lintr" ]]; then
@ -89,7 +89,7 @@ BuildLinterVersions() {
GET_VERSION_CMD="$(java -jar "/usr/bin/${LINTER}" --version 2>&1)" GET_VERSION_CMD="$(java -jar "/usr/bin/${LINTER}" --version 2>&1)"
elif [[ ${LINTER} == "clippy" ]]; then elif [[ ${LINTER} == "clippy" ]]; then
GET_VERSION_CMD="$(cargo-clippy --version 2>&1)" GET_VERSION_CMD="$(cargo-clippy --version 2>&1)"
elif [[ ${LINTER} == "protolint" ]]; then elif [[ ${LINTER} == "protolint" ]] || [[ ${LINTER} == "gitleaks" ]]; then
GET_VERSION_CMD="$(${LINTER} version)" GET_VERSION_CMD="$(${LINTER} version)"
elif [[ ${LINTER} == "editorconfig-checker" ]]; then elif [[ ${LINTER} == "editorconfig-checker" ]]; then
GET_VERSION_CMD="$(${LINTER} -version)" GET_VERSION_CMD="$(${LINTER} -version)"