From b02014ada216001551d4067e561e0a6db1fd200d Mon Sep 17 00:00:00 2001 From: fiftydinar <65243233+fiftydinar@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:06:55 +0100 Subject: [PATCH] Update dnf.sh --- modules/dnf/dnf.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/dnf/dnf.sh b/modules/dnf/dnf.sh index 702b425c..96527ec6 100644 --- a/modules/dnf/dnf.sh +++ b/modules/dnf/dnf.sh @@ -190,15 +190,15 @@ if [[ ${#REPLACE[@]} -gt 0 ]]; then get_json_array PACKAGES 'try .["packages"][]' "${REPLACEMENT}" # Ensure packages are provided - if [[ ${#PACKAGES[@]} == 0 ]]; then + if [[ ${#PACKAGES[@]} -eq 0 ]]; then echo "Error: No packages were provided for repository '${REPO}'." exit 1 fi echo "Replacing packages from repository: '${REPO}'" - echo "Replacing: ${REPLACE_STR}" + echo "Replacing: ${PACKAGES[*]}" - dnf -y "${WEAK_DEPS_FLAG}" distro-sync --refresh --repo "${REPO}" "${PACKEGES[@]}" + dnf -y "${WEAK_DEPS_FLAG}" distro-sync --refresh --repo "${REPO}" "${PACKAGES[@]}" done -fi \ No newline at end of file +fi