Closed
Description
I am not sure why nobody has this reported yet. Maybe I'm just making a very stupid mistake, but when I try to pass the cli arg --config
the config file is not read. I had a quick look into the code but I do not have any knowledge about the viper library that does the cli arg stuff.
- Here is what I quicky tested in the
cmd/main.go
from line 43 on.
cobra.OnInitialize(func() {
if cfgFile != "" {
viper.SetConfigFile(cfgFile)
}
fmt.Printf("+++ %+v\n", viper.ConfigFileUsed())
})
fmt.Printf("___ %+v\n", viper.ConfigFileUsed())
}
- I ran it with the argument
--config /home/usr/conf.yaml
. - My output was:
___
+++ /home/usr/conf.yaml
So it seems that dagu does not read the --config
arg somehow. I also tried the latest version 1.16.1
and nothing happens when you try to pass the --config
argument.
I tried dagu start-all --config /home/usr/config.yaml
but dagu just does not seem to care.
Metadata
Assignees
Labels
No labels
Activity