Skip to content

Commit 45da211

Browse files
authored
adds some logging if there is an error reading config files (#118)
1 parent cda8344 commit 45da211

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/client/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"gopkg.in/yaml.v3"
1818

1919
"github.com/stacklok/toolhive/pkg/config"
20+
"github.com/stacklok/toolhive/pkg/logger"
2021
"github.com/stacklok/toolhive/pkg/transport/ssecommon"
2122
)
2223

@@ -155,6 +156,10 @@ func FindClientConfigs() ([]ConfigFile, error) {
155156
clientConfig.Editor = pe.Editor
156157
configs = append(configs, clientConfig)
157158
}
159+
160+
if err != nil {
161+
logger.Log.Error(fmt.Sprintf("Error reading client config file %s: %v", pe.Path, err))
162+
}
158163
}
159164

160165
return configs, nil

0 commit comments

Comments
 (0)