From 4b8d9449e540c1ed282d9f63ea5386eca1b0a69e Mon Sep 17 00:00:00 2001 From: fcd <1352288+femnad@users.noreply.github.com> Date: Thu, 28 Nov 2024 00:15:50 +0000 Subject: [PATCH] update dnf addrepo command --- entity/dnfrepo.go | 2 +- provision/osrepo.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/entity/dnfrepo.go b/entity/dnfrepo.go index 2240a62..0a447b0 100644 --- a/entity/dnfrepo.go +++ b/entity/dnfrepo.go @@ -90,7 +90,7 @@ func (i installer) configManagerInstall(repo string) error { return err } - cmd := fmt.Sprintf("dnf config-manager --add-repo %s", repo) + cmd := fmt.Sprintf("dnf config-manager addrepo --from-repofile=%s", repo) return i.runMaybeSudo(cmd) } diff --git a/provision/osrepo.go b/provision/osrepo.go index 956a4eb..b2716ba 100644 --- a/provision/osrepo.go +++ b/provision/osrepo.go @@ -55,6 +55,7 @@ func addRepos(config entity.Config) error { err := repo.Install() if err == nil && repo.UpdateCmd() != "" { + internal.Log.Errorf("Error installing repo %s: %v", repo.Name(), err) updateCmds.Add(repo.UpdateCmd()) } errs = append(errs, err)