Print error message when forked process can't attach to nvim

References https://github.com/mhinz/neovim-remote/issues/99
pull/106/head v2.1.5
Marco Hinz 5 years ago
parent fc86cbfe1a
commit 1b40cf3da0
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

@ -60,6 +60,8 @@ class Nvr():
pass
def start_new_process(self):
args = os.environ.get('NVR_CMD')
args = args.split(' ') if args else ['nvim']
pid = os.fork()
if pid == 0:
for i in range(10):
@ -68,11 +70,12 @@ class Nvr():
self.started_new_process = True
return True
time.sleep(0.2)
print('[!] Unable to attach to the new nvim process. Is `{}` working?'
.format(" ".join(args)))
sys.exit(1)
else:
os.environ['NVIM_LISTEN_ADDRESS'] = self.address
try:
args = os.environ.get('NVR_CMD')
args = args.split(' ') if args else ['nvim']
os.dup2(sys.stdout.fileno(), sys.stdin.fileno())
os.execvpe(args[0], args, os.environ)
except FileNotFoundError:

@ -19,7 +19,7 @@ setup(
'console_scripts': ['nvr = nvr.nvr:main']
},
packages = ['nvr'],
version = '2.1.4',
version = '2.1.5',
license = 'MIT',
keywords = 'neovim nvim nvr remote helper',
classifiers = [

Loading…
Cancel
Save