@@ -39,15 +39,20 @@ def __call__(
3939 token += TimeoutToken (timeout )
4040
4141 converted_arguments = self .convert_arguments (arguments , split )
42+ print (converted_arguments )
4243 arguments_string_representation = ' ' .join ([argument if ' ' not in argument else f'"{ argument } "' for argument in converted_arguments ])
4344
4445 stdout_buffer : List [str ] = []
4546 stderr_buffer : List [str ] = []
4647 result = SubprocessResult ()
4748
4849 logger .info (f'The beginning of the execution of the command "{ arguments_string_representation } ".' )
50+ if platform .system () == 'Windows' :
51+ addictional_keys = {'shell' : True }
52+ else :
53+ addictional_keys = {}
4954
50- with Popen (list (converted_arguments ), stdout = PIPE , stderr = PIPE , bufsize = 1 , universal_newlines = True ) as process :
55+ with Popen (list (converted_arguments ), stdout = PIPE , stderr = PIPE , bufsize = 1 , universal_newlines = True , ** addictional_keys ) as process :
5156 stderr_reading_thread = self .run_stderr_thread (process , stderr_buffer , result , catch_output , stderr_callback )
5257 if not isinstance (token , DefaultToken ):
5358 killing_thread = self .run_killing_thread (process , token , result )
@@ -113,6 +118,7 @@ def split_argument(argument: str) -> List[str]:
113118 # https://stackoverflow.com/a/35900070/14522393
114119 if platform .system () == 'Windows' :
115120 return [argument ] # pragma: no cover
121+ return [argument ]
116122 return shlex_split (argument )
117123
118124 def run_killing_thread (self , process : Popen , token : AbstractToken , result : SubprocessResult ) -> Thread : # type: ignore[type-arg]
0 commit comments