mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-27 13:57:46 +00:00
catch config file errors
This commit is contained in:
@@ -102,6 +102,9 @@ func (context *AptlyContext) config() *utils.ConfigStructure {
|
|||||||
for _, configLocation := range configLocations {
|
for _, configLocation := range configLocations {
|
||||||
// FIXME: check if exists, check if readable
|
// FIXME: check if exists, check if readable
|
||||||
err = utils.LoadConfig(configLocation, &utils.Config)
|
err = utils.LoadConfig(configLocation, &utils.Config)
|
||||||
|
if os.IsPermission(err) || os.IsNotExist(err) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user