From 152c2720bb4e33ff50cd633c32ebc0ba513ae797 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 28 Nov 2026 15:58:01 +0100 Subject: [PATCH] don't quote repository open error by default --- internal/global/global.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/global/global.go b/internal/global/global.go index b46723a08..8b555e745 100644 --- a/internal/global/global.go +++ b/internal/global/global.go @@ -344,10 +344,10 @@ func hasRepositoryConfig(ctx context.Context, be backend.Backend, repo string, g fi, err := be.Stat(ctx, backend.Handle{Type: backend.ConfigFile}) if be.IsNotExist(err) { //nolint:staticcheck // capitalized error string is intentional - return fmt.Errorf("Fatal: %w: unable to open config file: %v\nIs there a repository at the following location?\n%q", ErrNoRepository, err, location.StripPassword(gopts.Backends, repo)) + return fmt.Errorf("Fatal: %w: unable to open config file: %v\nIs there a repository at the following location?\n%v", ErrNoRepository, err, ui.Quote(location.StripPassword(gopts.Backends, repo))) } if err != nil { - return errors.Fatalf("unable to open config file: %v\n%q", err, location.StripPassword(gopts.Backends, repo)) + return errors.Fatalf("unable to open config file: %v\n%v", err, ui.Quote(location.StripPassword(gopts.Backends, repo))) } if fi.Size == 0 {