mirror of
https://github.com/mhinz/neovim-remote
synced 2024-11-11 13:10:34 +00:00
Make main() take optional environment
This commit is contained in:
parent
aee0fa049c
commit
39519a7b00
@ -298,9 +298,9 @@ def print_sockaddrs():
|
||||
print(addr)
|
||||
|
||||
|
||||
def main(argv = sys.argv):
|
||||
def main(argv=sys.argv, env=os.environ):
|
||||
flags, arguments = parse_args(argv)
|
||||
address = os.environ.get('NVIM_LISTEN_ADDRESS')
|
||||
address = env.get('NVIM_LISTEN_ADDRESS')
|
||||
|
||||
if flags.servername:
|
||||
address = flags.servername
|
||||
|
Loading…
Reference in New Issue
Block a user