From be9b9906e99a9737243b61d534ba74960255b362 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Mon, 4 Nov 2024 08:14:29 -0600 Subject: [PATCH] fix: Passthrough git fetch error messages as warnings User feedback was that it's difficult to understand what to correct in git configuration if the git error message is not shown to users. Contributes to #355 --- CHANGELOG.md | 4 ++++ src/Recyclarr.Core/Repo/RepoUpdater.cs | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04e82436..bafcbe1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Notifications: New `verbosity` setting for Notifications to control the frequency and content of notifications sent after sync operations. +### Fixed + +- Repositories: Show a warning when there's a `git fetch` failure (#355). + ## [7.3.0] - 2024-10-28 ### Added diff --git a/src/Recyclarr.Core/Repo/RepoUpdater.cs b/src/Recyclarr.Core/Repo/RepoUpdater.cs index ebd4f28e..21426edd 100644 --- a/src/Recyclarr.Core/Repo/RepoUpdater.cs +++ b/src/Recyclarr.Core/Repo/RepoUpdater.cs @@ -62,11 +62,8 @@ public class RepoUpdater(ILogger log, IGitRepositoryFactory repositoryFactory) : } catch (GitCmdException e) { - log.Debug(e, "Non-zero exit code {ExitCode} while running git fetch", e.ExitCode); - log.Error( - "Updating the repo '{RepoDir}' (git fetch) failed. Proceeding with existing files. " + - "Check clone URL is correct and that github is not down", - repoPath.Name); + log.Warning(e, "Non-zero exit code {ExitCode} while running git fetch (will proceed with existing files)", + e.ExitCode); } await repo.ResetHard(token, repoSettings.Sha1 ?? $"origin/{branch}");