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,9 +179,12 @@ 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'],
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);
......
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