Skip to content

Commit

Permalink
catch config file errors
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Sep 14, 2024
1 parent 4051fad commit 4624fe3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4624fe3

Please sign in to comment.