mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Initialize config if it does not exist, set database relative to config dir
This commit is contained in:
parent
c101749faa
commit
ce5cdceb1f
6 changed files with 100 additions and 27 deletions
|
@ -30,7 +30,7 @@ func GetConfigFromFlag(cmd *cobra.Command, flagName string) (string, *viper.Vipe
|
|||
config = servicesConfig.Sub(configName)
|
||||
}
|
||||
if config == nil {
|
||||
cobra.CheckErr(fmt.Sprintf("Invalid source configuration \"%s\"", configName))
|
||||
cobra.CheckErr(fmt.Sprintf("invalid configuration \"%s\"", configName))
|
||||
}
|
||||
return configName, config
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue