fs: fix confusing "didn't find section in config file" error

This change decorates the error with the section name not found which
will hopefully save user confusion.

Fixes #8170
This commit is contained in:
Nick Craig-Wood
2025-01-15 16:32:59 +00:00
parent 2c72842c10
commit 5316acd046
5 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -459,7 +459,7 @@ func Run(t *testing.T, opt *Opt) {
subRemoteName, subRemoteLeaf, err = fstest.RandomRemoteName(remoteName)
require.NoError(t, err)
f, err = fs.NewFs(context.Background(), subRemoteName)
if err == fs.ErrorNotFoundInConfigFile {
if errors.Is(err, fs.ErrorNotFoundInConfigFile) {
t.Logf("Didn't find %q in config file - skipping tests", remoteName)
return
}