Skip to content

Commit

Permalink
chore: Auto-confirm prompts (-y) when adding repos
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftydinar authored Dec 22, 2024
1 parent 6d1047f commit 9d13c87
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 @@ -35,13 +35,13 @@ if [[ ${#REPOS[@]} -gt 0 ]]; then
for repo in "${REPOS[@]}"; do
if [[ "${repo}" =~ ^https?:\/\/.* ]]; then
echo "Adding repository URL: '${repo}'"
dnf config-manager addrepo --from-repofile="${repo}"
dnf -y config-manager addrepo --from-repofile="${repo}"
elif [[ "${repo}" == *".repo" ]] && [[ -f "${CONFIG_DIRECTORY}/dnf/${repo}" ]]; then
echo "Adding repository file: '${repo}'"
dnf config-manager addrepo --from-repofile="${repo}"
dnf -y config-manager addrepo --from-repofile="${repo}"
elif [[ "${repo}" == "copr: "* ]]; then
echo "Adding COPR repository: '${repo#copr: }'"
dnf copr enable "${repo#copr: }"
dnf -y copr enable "${repo#copr: }"
fi
done
fi
Expand Down

0 comments on commit 9d13c87

Please sign in to comment.