mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 05:35:10 -07:00
Allow USERNAME to be specified on the command line.
There are some systems that have usernames of the form DOMAIN\username, which causes an invalid escape character to be inserted. I was going to add some escaping, but decided it would be best to just outright set the value, since I don't want the DOMAIN portion in there anyways.
This commit is contained in:
parent
302998b0c7
commit
14e4e678b9
@ -17,7 +17,7 @@ configure_file (
|
|||||||
find_program(WHOAMI_PROG whoami)
|
find_program(WHOAMI_PROG whoami)
|
||||||
find_program(HOSTNAME_PROG hostname)
|
find_program(HOSTNAME_PROG hostname)
|
||||||
|
|
||||||
if (EXISTS ${WHOAMI_PROG})
|
if (NOT DEFINED USERNAME AND EXISTS ${WHOAMI_PROG})
|
||||||
execute_process(COMMAND ${WHOAMI_PROG}
|
execute_process(COMMAND ${WHOAMI_PROG}
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
OUTPUT_VARIABLE USERNAME)
|
OUTPUT_VARIABLE USERNAME)
|
||||||
|
Loading…
Reference in New Issue
Block a user