Merge pull request #780 from rxwen/master

flush the options_file before start the ycmd server
This commit is contained in:
Val Markovic 2014-01-21 10:06:00 -08:00
commit d156214f76
2 changed files with 2 additions and 1 deletions

View File

@ -176,7 +176,7 @@ def ForceSemanticCompletion( request_data ):
# A wrapper for subprocess.Popen that works around a Popen bug on Windows.
def SafePopen( *args, **kwargs ):
if kwargs.get( 'stdin', '' ) is None:
if kwargs.get( 'stdin' ) is None:
# We need this on Windows otherwise bad things happen. See issue #637.
kwargs[ 'stdin' ] = subprocess.PIPE if OnWindows() else None

View File

@ -84,6 +84,7 @@ class YouCompleteMe( object ):
with tempfile.NamedTemporaryFile( delete = False ) as options_file:
self._temp_options_filename = options_file.name
json.dump( dict( self._user_options ), options_file )
options_file.flush()
args = [ utils.PathToPythonInterpreter(),
_PathToServerScript(),
'--port={0}'.format( server_port ),