Return default config if config path is not found

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2022-05-20 14:17:08 +02:00
parent f0cae49892
commit 73a5b70a02
2 changed files with 2 additions and 1 deletions

View File

@@ -61,7 +61,7 @@ func GetConfig() (*Config, error) {
tomlFile, err := os.Open(configFilePath)
if err != nil {
return nil, fmt.Errorf("failed to open config file %v: %v", configFilePath, err)
return getDefaultConfig(), nil
}
defer tomlFile.Close()