summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Gassner <justin.gassner@mailbox.org>2024-04-05 22:13:10 +0200
committerJustin Gassner <justin.gassner@mailbox.org>2024-04-05 22:48:48 +0200
commit5dc11d0a623e242014e4144b6070bc1d62747939 (patch)
treec337eca4cc1b36f818151734b25acdccc18fd6f6
parent7a0b055e16796362ff0bd727dd577e06c0a7ed55 (diff)
Revert 'printf' lint for the pacscripts script
The lint change made in commit [17f27b53](!33 (17f27b53)) for the `pacscripts` script regarding the `printf` statement broke the expected formatting. This parallels a previous [issue](#118) with the `updpkgsums` script, which was fixed in commit [88c4b490](!38 (88c4b490)). As far as I can tell, we have an exception to shellcheck rule SC2059, because the first argument to `error()` is meant to be a format string that is filled with remaining arguments. Interestingly enough, this script does not even use the `error()` function this way, but calls it with single strings built by variable expansion.
-rw-r--r--src/pacscripts.sh.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pacscripts.sh.in b/src/pacscripts.sh.in
index e4ea852..27f9f0b 100644
--- a/src/pacscripts.sh.in
+++ b/src/pacscripts.sh.in
@@ -29,7 +29,8 @@ declare -r myver='@PACKAGE_VERSION@'
error() {
local mesg=$1; shift
- printf "==> $(gettext "ERROR:") %s\n ${mesg}" "$@" >&2
+ # shellcheck disable=SC2059
+ printf "==> $(gettext "ERROR:") ${mesg}\n" "$@" >&2
}
usage() {