Commit 1be406b1 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Move the discovered Java installation to the front of PATH when running sdkmanager (#10846)

Fixes https://github.com/flutter/flutter/issues/10703
parent 6d32b339
......@@ -178,7 +178,7 @@ class AndroidWorkflow extends DoctorValidator implements Workflow {
final String javaBinary = _findJavaBinary();
if (javaBinary != null) {
sdkManagerEnv['PATH'] =
platform.environment['PATH'] + os.pathVarSeparator + fs.path.dirname(javaBinary);
fs.path.dirname(javaBinary) + os.pathVarSeparator + platform.environment['PATH'];
}
final String sdkManagerPath = fs.path.join(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment