Skip to content

Commit

Permalink
fix: Replacing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftydinar authored Dec 23, 2024
1 parent a72ae5c commit 2790123
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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

0 comments on commit 2790123

Please sign in to comment.