Merge pull request #19965 from neikeq/issue-19961

Mono: Fix build script not decoding process utf-8 output
This commit is contained in:
Ignacio Etcheverry 2018-07-04 16:09:42 +02:00 committed by GitHub
commit f8daa080f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -276,7 +276,10 @@ def pkgconfig_try_find_mono_version():
def mono_root_try_find_mono_version(mono_root):
first_line = subprocess.check_output([os.path.join(mono_root, 'bin', 'mono'), '--version']).splitlines()[0]
from compat import decode_utf8
output = subprocess.check_output([os.path.join(mono_root, 'bin', 'mono'), '--version'])
first_line = decode_utf8(output.splitlines()[0])
try:
return LooseVersion(first_line.split()[len('Mono JIT compiler version'.split())])
except (ValueError, IndexError):