home: imp code

This commit is contained in:
Dimitry Kolyshev 2024-03-28 09:00:00 +08:00
parent 06dbcfead7
commit 806ff9bad0
2 changed files with 3 additions and 1 deletions

View File

@ -760,7 +760,8 @@ func writePIDFile(fn string) bool {
}
// initConfigFilename sets up context config file path. This file path can be
// overridden by command-line arguments, or is set to default.
// overridden by command-line arguments, or is set to default. Must only be
// called after initializing the workDir with initWorkingDir.
func initConfigFilename(opts options) {
confPath := opts.confFilename
if confPath == "" {

View File

@ -274,6 +274,7 @@ func handleServiceCommand(s service.Service, action string, opts options) (err e
if err = initWorkingDir(opts); err != nil {
return fmt.Errorf("failed to init working dir: %w", err)
}
initConfigFilename(opts)
handleServiceInstallCommand(s)