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