refactor: cmd update.

This commit is contained in:
Gordon 2024-04-15 10:33:15 +08:00
parent 285b1e8243
commit ba25beff94

View File

@ -15,6 +15,7 @@
package cmd
import (
"context"
"fmt"
"path/filepath"
@ -83,6 +84,7 @@ func NewRootCmd(processName string, opts ...func(*CmdOpts)) *RootCmd {
func (r *RootCmd) persistentPreRun(cmd *cobra.Command, opts ...func(*CmdOpts)) error {
cmdOpts := r.applyOptions(opts...)
log.CInfo(context.Background(), "config", cmdOpts.configMap)
if err := r.initializeConfiguration(cmd, cmdOpts); err != nil {
return err
}