diff options
Diffstat (limited to 'build/generator/gen_win_dependencies.py')
-rw-r--r-- | build/generator/gen_win_dependencies.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/build/generator/gen_win_dependencies.py b/build/generator/gen_win_dependencies.py index a9ee652..2325ccf 100644 --- a/build/generator/gen_win_dependencies.py +++ b/build/generator/gen_win_dependencies.py @@ -1067,11 +1067,15 @@ class GenDependenciesBase(gen_base.GeneratorBase): return try: - outfp = subprocess.Popen([os.path.join(jdk_path, 'bin', 'javah.exe'), - '-version'], stdout=subprocess.PIPE).stdout + # Apparently a 1.8 javac writes its version output to stderr, while + # a 1.10 javac writes it to stdout. To catch them all, we redirect + # stderr to stdout. + outfp = subprocess.Popen([os.path.join(jdk_path, 'bin', 'javac.exe'), + '-version'], stdout=subprocess.PIPE, + stderr=subprocess.STDOUT).stdout line = outfp.read() if line: - vermatch = re.search(r'"(([0-9]+(\.[0-9]+)+)(_[._0-9]+)?)"', line, re.M) + vermatch = re.search(r'(([0-9]+(\.[0-9]+)+)(_[._0-9]+)?)', line, re.M) else: vermatch = None |