From c484a55cde24457f6a8f6f581f7502da2f873b30 Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Mon, 29 Apr 2024 14:46:21 +0200 Subject: fix(version): dont die if no PKGBUILD is found So far the commands would stop execution if one of the target directories did not contain a PKGBUILD instead of just reporting failure for that directory. Fix this by replacing the 'die' calls with setting the error for the spinner facility. Component: pkgctl version check Component: pkgctl version upgrade Signed-off-by: Christian Heusel --- src/lib/version/upgrade.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib/version/upgrade.sh') diff --git a/src/lib/version/upgrade.sh b/src/lib/version/upgrade.sh index c57171c..70a4659 100644 --- a/src/lib/version/upgrade.sh +++ b/src/lib/version/upgrade.sh @@ -111,8 +111,13 @@ pkgctl_version_upgrade() { fi pushd "${path}" >/dev/null + (( ++current_item )) + if [[ ! -f "PKGBUILD" ]]; then - die "No PKGBUILD found for ${path}" + result="${BOLD}${path}${ALL_OFF}: no PKGBUILD found" + failure+=("${result}") + popd >/dev/null + continue fi # reset common PKGBUILD variables @@ -122,7 +127,6 @@ pkgctl_version_upgrade() { pkgbase=${pkgbase:-$pkgname} # update the current terminal spinner status - (( ++current_item )) pkgctl_version_upgrade_spinner \ "${status_dir}" \ "${#up_to_date[@]}" \ -- cgit v1.2.3-70-g09d2