From 0b9c68fcb02dad92865a3790387c00f9e078eeff Mon Sep 17 00:00:00 2001 From: fiftydinar <65243233+fiftydinar@users.noreply.github.com> Date: Sun, 22 Dec 2024 17:53:36 +0100 Subject: [PATCH] Update dnf.sh --- modules/dnf/dnf.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/dnf/dnf.sh b/modules/dnf/dnf.sh index 8b506585..2da0af01 100644 --- a/modules/dnf/dnf.sh +++ b/modules/dnf/dnf.sh @@ -26,9 +26,10 @@ if [[ ${#REPOS[@]} -gt 0 ]]; then repo="${repo//%OS_VERSION%/${OS_VERSION}}" # Extract copr repo array element properly here without JSON brackets if [[ "${repo}" == "{\"copr\":\""*"\"}" ]]; then - repo="$(echo "copr: $(echo "${repo}" | jq -r '.copr')")" + REPOS[$i]="$(echo "copr: $(echo "${repo}" | jq -r '.copr')")" + else + REPOS[$i]="${repo//[$'\t\r\n ']}" fi - REPOS[$i]="${repo//[$'\t\r\n ']}" done # dnf config-manager & dnf copr don't support adding multiple repositories at once, hence why for/done loop is used for repo in "${REPOS[@]}"; do