diff --git a/cmd/server.go b/cmd/server.go index 3758009f6..88f0e1782 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -37,6 +37,7 @@ var ServerCmd = &cobra.Command{ the address is defined in config file`, Run: func(cmd *cobra.Command, args []string) { Init() + os.Stdout.Sync() if conf.Conf.DelayedStart != 0 { utils.Log.Infof("delayed start for %d seconds", conf.Conf.DelayedStart) time.Sleep(time.Duration(conf.Conf.DelayedStart) * time.Second) diff --git a/internal/bootstrap/data/user.go b/internal/bootstrap/data/user.go index 00b899091..160d1ec46 100644 --- a/internal/bootstrap/data/user.go +++ b/internal/bootstrap/data/user.go @@ -42,6 +42,7 @@ func initUser() { // DO NOT output the password to log file. Only output to console. // utils.Log.Infof("Successfully created the admin user and the initial password is: %s", adminPassword) fmt.Printf("Successfully created the admin user and the initial password is: %s\n", adminPassword) + os.Stdout.Sync() } } else { utils.Log.Fatalf("[init user] Failed to get admin user: %v", err)