From 144f9a871ee554b44e1d9733a56d6b4dc99803fe Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 6 Jun 2024 16:26:35 +0200 Subject: fix(version): Ignore warnings when nvchecker ignores invalid versions Since version 2.15.1 nvchecker emits a warning for version strings that it consideres invalid (e.g. in the case of PyPI). These warning messages get in the way (the first version emitted via a warning is used as version to compare against) of retrieving the latest version of an upstream and therefore we ignore them. Component: pkgctl version check Signed-off-by: David Runge --- src/lib/version/check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/version/check.sh') diff --git a/src/lib/version/check.sh b/src/lib/version/check.sh index 0449c60..4a2b5fa 100644 --- a/src/lib/version/check.sh +++ b/src/lib/version/check.sh @@ -227,7 +227,7 @@ get_upstream_version() { fi if ! output=$(GIT_TERMINAL_PROMPT=0 nvchecker --file "${config}" --logger json "${opts[@]}" 2>&1 | \ - jq --raw-output 'select(.level != "debug")'); then + jq --raw-output 'select((.level != "debug") and (.event != "ignoring invalid version"))'); then printf "failed to run nvchecker: %s" "${output}" return 1 fi -- cgit v1.2.3-70-g09d2