Null safe migration for fuchsia_remote_debug_protocol (#74762)

This commit is contained in:
Dan Field
2021-01-27 11:44:51 -08:00
committed by GitHub
parent d546e1d311
commit a204f038fc
7 changed files with 116 additions and 143 deletions

View File

@@ -44,7 +44,7 @@ class SshCommandRunner {
/// IPv4 nor IPv6. When connecting to a link local address (`fe80::` is
/// usually at the start of the address), an interface should be supplied.
SshCommandRunner({
this.address,
required this.address,
this.interface = '',
this.sshConfigPath,
}) : _processManager = const LocalProcessManager() {
@@ -55,7 +55,7 @@ class SshCommandRunner {
@visibleForTesting
SshCommandRunner.withProcessManager(
this._processManager, {
this.address,
required this.address,
this.interface = '',
this.sshConfigPath,
}) {
@@ -70,7 +70,7 @@ class SshCommandRunner {
final String address;
/// The path to the SSH config (optional).
final String sshConfigPath;
final String? sshConfigPath;
/// The name of the machine's network interface (for use with IPv6
/// connections. Ignored otherwise).
@@ -84,7 +84,7 @@ class SshCommandRunner {
final List<String> args = <String>[
'ssh',
if (sshConfigPath != null)
...<String>['-F', sshConfigPath],
...<String>['-F', sshConfigPath!],
if (isIpV6Address(address))
...<String>['-6', if (interface.isEmpty) address else '$address%$interface']
else