From 0fd842a29e1826e85bf495b5a88960a9e58eb9a5 Mon Sep 17 00:00:00 2001 From: micbou Date: Thu, 2 Jul 2015 20:47:13 +0200 Subject: [PATCH] Set stdin to PIPE on Windows only when necessary Executing the check_core_version.py script with SafePopen and stdin to PIPE raises an error in Vim on Windows. Since the stdin option is only useful when starting the ycmd server, it is only set in this case. --- python/ycm/youcompleteme.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index d9147686..895296dd 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -130,7 +130,8 @@ class YouCompleteMe( object ): if self._user_options[ 'server_keep_logfiles' ]: args.append('--keep_logfiles') - self._server_popen = utils.SafePopen( args, stdout = PIPE, stderr = PIPE) + self._server_popen = utils.SafePopen( args, stdin_windows = PIPE, + stdout = PIPE, stderr = PIPE) BaseRequest.server_location = 'http://127.0.0.1:' + str( server_port ) BaseRequest.hmac_secret = hmac_secret