From 279012362a2744d001db14cfafcfd7d267f3c3a7 Mon Sep 17 00:00:00 2001 From: fiftydinar <65243233+fiftydinar@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:06:03 +0100 Subject: [PATCH] fix: Replacing packages --- modules/dnf/dnf.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/dnf/dnf.sh b/modules/dnf/dnf.sh index 3d49fd3a..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