Commit d1fa2116 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Use runCommand to start sdkmanager and adjust the executable name for Windows (#9962)

Fixes https://github.com/flutter/flutter/issues/9954
parent fc1b5c9b
......@@ -179,10 +179,13 @@ class AndroidWorkflow extends DoctorValidator implements Workflow {
platform.environment['PATH'] + os.pathVarSeparator + fs.path.dirname(javaBinary);
}
final Process process = await Process.start(
fs.path.join(androidSdk.directory, 'tools', 'bin', 'sdkmanager'),
<String>['--licenses'],
environment: sdkManagerEnv,
final String sdkManagerPath = fs.path.join(
androidSdk.directory, 'tools', 'bin',
platform.isWindows ? 'sdkmanager.bat' : 'sdkmanager',
);
final Process process = await runCommand(
<String>[sdkManagerPath, '--licenses'],
environment: sdkManagerEnv,
);
stdout.addStream(process.stdout);
stderr.addStream(process.stderr);
......
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