File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ Look for version string in the entire output of svn --version, not just the first line
Original file line number Diff line number Diff line change 25
25
26
26
27
27
if MYPY_CHECK_RUNNING :
28
- from typing import Optional , Tuple
28
+ from typing import Optional , Tuple , Text
29
29
from pip ._internal .utils .subprocess import CommandArgs
30
30
from pip ._internal .utils .misc import HiddenText
31
31
from pip ._internal .vcs .versioncontrol import AuthInfo , RevOptions
@@ -215,7 +215,17 @@ def call_vcs_version(self):
215
215
# svn, version 1.7.14 (r1542130)
216
216
# compiled Mar 28 2018, 08:49:13 on x86_64-pc-linux-gnu
217
217
version_prefix = 'svn, version '
218
- version = self .run_command (['--version' ], show_stdout = False )
218
+ cmd_output = self .run_command (['--version' ], show_stdout = False )
219
+
220
+ # Split the output by newline, and find the line where
221
+ # version_prefix is present
222
+ output_lines = cmd_output .split ('\n ' )
223
+ version = '' # type: Text
224
+
225
+ for line in output_lines :
226
+ if version_prefix in line :
227
+ version = line
228
+
219
229
if not version .startswith (version_prefix ):
220
230
return ()
221
231
You can’t perform that action at this time.
0 commit comments