From d405b74caf700df2c39da75691e8df1ca25f7e10 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 5 Nov 2018 15:12:08 -0800 Subject: [PATCH] java: javac 9+ print their version to stdout not stderr Fixes: #2569 --- mesonbuild/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index f45f91bf1..2a6f750b4 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -803,8 +803,8 @@ class Environment: p, out, err = Popen_safe(exelist + ['-version']) except OSError: raise EnvironmentException('Could not execute Java compiler "%s"' % ' '.join(exelist)) - version = search_version(err) if 'javac' in out or 'javac' in err: + version = search_version(err if 'javac' in err else out) return JavaCompiler(exelist, version) raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"')