catch config file errors

This commit is contained in:
André Roth
2024-09-14 18:48:44 +02:00
parent 8e8cf90a71
commit 0178093f6c
+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
}