summaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-25 07:06:56 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-25 07:06:56 -0400
commitbe69e74bc05b62deb6a5f9ae360af220cd5d5226 (patch)
tree45a9c88be863b6e75857bc80548a8f57e57fe400 /modules/base
parente95be2cb3e1e320ecd86f0743acaeeb76f50e3e5 (diff)
downloadgitea-be69e74bc05b62deb6a5f9ae360af220cd5d5226.tar.gz
gitea-be69e74bc05b62deb6a5f9ae360af220cd5d5226.zip
Mirror fix
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/conf.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go
index d0f8ae2cc8..3eb01bdd56 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -274,6 +274,9 @@ func NewConfigContext() {
RunUser = Cfg.MustValue("", "RUN_USER")
curUser := os.Getenv("USERNAME")
+ if len(curUser) == 0 {
+ curUser = os.Getenv("whoami")
+ }
if RunUser != curUser {
fmt.Printf("Expect user(%s) but current user is: %s\n", RunUser, curUser)
os.Exit(2)