mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 18:32:18 +08:00
handle cases where no username is set
This commit is contained in:
parent
30e4f14d1d
commit
6b11a3ee21
@ -65,9 +65,17 @@ if(DOCSERVER_PORT GREATER_EQUAL 0)
|
|||||||
set(port ${DOCSERVER_PORT})
|
set(port ${DOCSERVER_PORT})
|
||||||
else()
|
else()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(username $ENV{USERNAME})
|
if(DEFINED $ENV{USERNAME})
|
||||||
|
set(username $ENV{USERNAME})
|
||||||
|
else()
|
||||||
|
set(username "dummy_user")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(username $ENV{USER})
|
if(DEFINED $ENV{USER})
|
||||||
|
set(username $ENV{USER})
|
||||||
|
else()
|
||||||
|
set(username "dummy_user")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
string(MD5 username_hash ${username})
|
string(MD5 username_hash ${username})
|
||||||
# cmake math function can only use 64 bit signed integers - so we just truncate the string
|
# cmake math function can only use 64 bit signed integers - so we just truncate the string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user