catch config file errors

This commit is contained in:
André Roth committed 2024-09-24 10:14:39 +02:00
1 parent 8e8cf90a71
commit 0178093f6c
1 file changed
+3
+3
View File
@@ -102,6 +102,9 @@ func (context *AptlyContext) config() *utils.ConfigStructure {
for _, configLocation := range configLocations {
// FIXME: check if exists, check if readable
err = utils.LoadConfig(configLocation, &utils.Config)
if os.IsPermission(err) || os.IsNotExist(err) {
continue
}
if err == nil {
break
}