Commit 35de41d6 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Require the diagnotic-port flag on the flutter skia command (#6174)

The diagnostic port forward can be arbitrarily assigned and typically
is not the default

Fixes https://github.com/flutter/flutter/issues/5867
parent b371788d
......@@ -7,7 +7,6 @@ import 'dart:io';
import 'package:http/http.dart' as http;
import '../base/common.dart';
import '../globals.dart';
import '../runner/flutter_command.dart';
......@@ -16,7 +15,6 @@ class SkiaCommand extends FlutterCommand {
argParser.addOption('output-file', help: 'Write the Skia picture file to this path.');
argParser.addOption('skiaserve', help: 'Post the picture to a skiaserve debugger at this URL.');
argParser.addOption('diagnostic-port',
defaultsTo: kDefaultDiagnosticPort.toString(),
help: 'Local port where the diagnostic server is listening.');
}
......@@ -45,6 +43,10 @@ class SkiaCommand extends FlutterCommand {
printError('Must provide --output-file or --skiaserve');
return 1;
}
if (argResults['diagnostic-port'] == null) {
printError('Must provide --diagnostic-port');
return 1;
}
Uri skpUri = new Uri(scheme: 'http', host: '127.0.0.1',
port: int.parse(argResults['diagnostic-port']),
......
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