From a456ee2cecb7bbff57bef6cc668663dcea4d52a6 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 13 Dec 2022 09:32:25 +0100 Subject: [PATCH] MT#56190 Adjust scripts for shellcheck v0.9.0 Fixing issues reported by new shellcheck v0.9.0: 1) SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). https://www.shellcheck.net/wiki/SC2317 (new feature as of shellcheck v0.9.0) 2) SC2086 (info): Double quote to prevent globbing and word splitting. https://www.shellcheck.net/wiki/SC2086 (behavior change with shellcheck v0.9.0) Change-Id: I73d50157f72b772c381cf1bff497079133bc6d09 --- scripts/check | 2 +- scripts/decrypt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/check b/scripts/check index ae9b69de..1eb1cc55 100755 --- a/scripts/check +++ b/scripts/check @@ -273,7 +273,7 @@ check_shared_storage() { else log_info "Outstanding pull actions have been identified (see ACTION_NEEDED), exiting." log_info "TIP: '--no-action-failure' forces execution within 'apply' anyway (use with care!)." - return $RC + return "$RC" fi } diff --git a/scripts/decrypt b/scripts/decrypt index 62e9cbf2..92e5af58 100755 --- a/scripts/decrypt +++ b/scripts/decrypt @@ -38,6 +38,7 @@ log_info() { } # info without ending newline +# shellcheck disable=SC2317 log_info_n() { logger -t ngcpcfg --id="${NGCPCFG_PID}" -- "$*" console_output "$*" @@ -53,6 +54,7 @@ log_error() { console_output "Error: $*\n" >&2 } +# shellcheck disable=SC2317 log_debug() { if [ -n "${DEBUG:-}" ] ; then logger -t ngcpcfg --id="${NGCPCFG_PID}" -- "Debug: $*"