Skip to content

Commit 5f25679

Browse files
ILoveScratch2elysia-best
authored andcommitted
fix(user): show admin password on first start (#883)
* fix: fix admin password not shown in first start * chore: add time dependence Co-authored-by: Yinan Qin <[email protected]> Signed-off-by: ILoveScratch <[email protected]> * fix: fix log format Co-authored-by: Yinan Qin <[email protected]> Signed-off-by: ILoveScratch <[email protected]> --------- Signed-off-by: ILoveScratch <[email protected]> Co-authored-by: Yinan Qin <[email protected]>
1 parent bc97a25 commit 5f25679

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/bootstrap/data/user.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package data
22

33
import (
4+
"fmt"
5+
"time"
46
"os"
57

68
"github.com/OpenListTeam/OpenList/v4/cmd/flags"
@@ -39,6 +41,7 @@ func initUser() {
3941
panic(err)
4042
} else {
4143
utils.Log.Infof("Successfully created the admin user and the initial password is: %s", adminPassword)
44+
fmt.Printf("\033[36mINFO\033[39m[%s] Successfully created the admin user and the initial password is: %s\n", time.Now().Format("2006-01-02 15:04:05"), adminPassword)
4245
}
4346
} else {
4447
utils.Log.Fatalf("[init user] Failed to get admin user: %v", err)

0 commit comments

Comments
 (0)