Browse Source

Mirror fix

for-closed-social
Unknown 10 years ago
parent
commit
be69e74bc0
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      modules/base/conf.go

+ 3
- 0
modules/base/conf.go View File

@ -274,6 +274,9 @@ func NewConfigContext() {
RunUser = Cfg.MustValue("", "RUN_USER") RunUser = Cfg.MustValue("", "RUN_USER")
curUser := os.Getenv("USERNAME") curUser := os.Getenv("USERNAME")
if len(curUser) == 0 {
curUser = os.Getenv("whoami")
}
if RunUser != curUser { if RunUser != curUser {
fmt.Printf("Expect user(%s) but current user is: %s\n", RunUser, curUser) fmt.Printf("Expect user(%s) but current user is: %s\n", RunUser, curUser)
os.Exit(2) os.Exit(2)

Loading…
Cancel
Save