From 7071186e1efe2b96cfb4555aa38570bfd5ba1049 Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Thu, 8 May 2025 09:43:40 -0500 Subject: Fix verification Use the Mirror's verification parameter instead of the global parameter and remove it. This fixes an issue where mirrors were not being verified. --- internal/service/config.go | 2 -- internal/service/service.go | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'internal/service') diff --git a/internal/service/config.go b/internal/service/config.go index d4faeb0..0f32851 100644 --- a/internal/service/config.go +++ b/internal/service/config.go @@ -29,7 +29,6 @@ type GlobalConfig struct { MinInterval *Duration `toml:"min-interval"` StagingMethod string `toml:"staging-method,omitempty"` StagingPath string `toml:"staging-path,omitempty"` - Verify string `toml:"verify,omitempty"` } type Config struct { @@ -47,7 +46,6 @@ var DefaultConfig = Config{ MinInterval: DurationRef(time.Hour), StagingMethod: StagingMethodNone, StagingPath: "/tmp/mirror", - Verify: "", }, } diff --git a/internal/service/service.go b/internal/service/service.go index 12f79dc..7d0ab83 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -189,8 +189,8 @@ func (s *Service) Mirror(arg *Mirror) error { return fmt.Errorf("could not clone from '%s': %w", arg.From, err) } - if s.cfg.Verify != "" { - err = runBash(downloadPath, s.cfg.Verify) + if arg.Verify != "" { + err = runBash(downloadPath, arg.Verify) if err != nil { return fmt.Errorf("verification failed: %w", err) } -- cgit v1.2.3