From 0178093f6c9bcd00f91faed1727ddab14f9305d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Roth?= Date: Sat, 14 Sep 2024 18:48:44 +0200 Subject: [PATCH] catch config file errors --- context/context.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/context/context.go b/context/context.go index a3d56688..30e84d42 100644 --- a/context/context.go +++ b/context/context.go @@ -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 }