mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-19 19:29:52 +08:00
script
This commit is contained in:
parent
a3aa965b37
commit
10cf431ccf
@ -12,7 +12,7 @@ func main() {
|
||||
authCmd := cmd.NewAuthCmd()
|
||||
authCmd.AddPortFlag()
|
||||
authCmd.AddPrometheusPortFlag()
|
||||
if err := authCmd.Execute(); err != nil {
|
||||
if err := authCmd.Exec(); err != nil {
|
||||
fmt.Println(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
@ -17,9 +17,10 @@ func NewAuthCmd() *AuthCmd {
|
||||
}
|
||||
|
||||
func (a *AuthCmd) Exec() error {
|
||||
a.Command.Run = func(cmd *cobra.Command, args []string) {
|
||||
a.Command.RunE = func(cmd *cobra.Command, args []string) error {
|
||||
a.port = a.getPortFlag(cmd)
|
||||
a.prometheusPort = a.getPrometheusPortFlag(cmd)
|
||||
return a.getConfFromCmdAndInit(cmd)
|
||||
}
|
||||
return a.Execute()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user