fix: the configuration file path is not being detected when it is enclosed in quotes

This commit is contained in:
2025-01-12 07:58:32 +01:00
parent 1b60ca6fd2
commit 2c3f2f4a46
3 changed files with 6 additions and 4 deletions

View File

@@ -155,6 +155,8 @@ func readConf(configFile string) (*Config, error) {
// checkConfigFile checks config files and returns one config file
func checkConfigFile(filePath string) (string, error) {
// Remove the quotes
filePath = strings.Trim(filePath, `"`)
// Define possible config file names
configFiles := []string{filepath.Join(workingDir, "config.yaml"), filepath.Join(workingDir, "config.yml"), filePath}