Skip to content

Commit

Permalink
Update dnf.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftydinar authored Dec 23, 2024
1 parent b5e102b commit b02014a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/dnf/dnf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
fi

0 comments on commit b02014a

Please sign in to comment.