Issue UI: fix config file resolution (#23832)
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Demo (push) Has been cancelled
Release / Hassio Addon (push) Has been cancelled

Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
Thomas Speer 2025-09-26 12:48:38 +02:00 • committed by GitHub
parent 0880f82c65
commit 4a4027c766
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 7 deletions

View file

@ -294,7 +294,7 @@ func runRoot(cmd *cobra.Command, args []string) {
// publish system infos
valueChan <- util.Param{Key: keys.Version, Val: util.FormattedVersion()}
valueChan <- util.Param{Key: keys.Config, Val: cfgFile}
valueChan <- util.Param{Key: keys.Config, Val: viper.ConfigFileUsed()}
valueChan <- util.Param{Key: keys.Database, Val: db.FilePath}
// run shutdown functions on stop
@ -343,7 +343,7 @@ func runRoot(cmd *cobra.Command, args []string) {
log.INFO.Println("evcc was stopped by user. OS should restart the service. Or restart manually.")
err = errors.New("restart required") // https://gokrazy.org/development/process-interface/
once.Do(func() { close(stopC) }) // signal loop to end
}, cfgFile)
}, viper.ConfigFileUsed())
// show and check version, reduce api load during development
if util.Version != util.DevVersion {