This reverts commit c592b54678.
This commit is contained in:
@@ -27,7 +27,6 @@ import 'application_package.dart';
|
||||
import 'fuchsia_build.dart';
|
||||
import 'fuchsia_pm.dart';
|
||||
import 'fuchsia_sdk.dart';
|
||||
import 'fuchsia_utils.dart';
|
||||
import 'fuchsia_workflow.dart';
|
||||
import 'tiles_ctl.dart';
|
||||
|
||||
@@ -514,7 +513,12 @@ class FuchsiaDevice extends Device {
|
||||
void clearLogs() {}
|
||||
|
||||
bool get ipv6 {
|
||||
return isIPv6Address(id);
|
||||
try {
|
||||
Uri.parseIPv6Address(id);
|
||||
return true;
|
||||
} on FormatException {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// List the ports currently running a dart observatory.
|
||||
|
||||
@@ -10,7 +10,6 @@ import '../convert.dart';
|
||||
import '../globals.dart' as globals;
|
||||
|
||||
import 'fuchsia_sdk.dart';
|
||||
import 'fuchsia_utils.dart';
|
||||
|
||||
/// This is a basic wrapper class for the Fuchsia SDK's `pm` tool.
|
||||
class FuchsiaPM {
|
||||
@@ -110,9 +109,6 @@ class FuchsiaPM {
|
||||
if (fuchsiaArtifacts.pm == null) {
|
||||
throwToolExit('Fuchsia pm tool not found');
|
||||
}
|
||||
if (isIPv6Address(host.split('%').first)) {
|
||||
host = '[${host.replaceAll('%', '%25')}]';
|
||||
}
|
||||
final List<String> command = <String>[
|
||||
fuchsiaArtifacts.pm.path,
|
||||
'serve',
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
/// Returns [true] if [address] is an IPv6 address.
|
||||
bool isIPv6Address(String address) {
|
||||
try {
|
||||
Uri.parseIPv6Address(address);
|
||||
return true;
|
||||
} on FormatException {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user