Unverified Commit c7ee37a0 authored by Zachary Anderson's avatar Zachary Anderson Committed by GitHub

[fuchsia] Pass a dummy command to the ssh tunnel setup (#16906)

* [fuchsia] Pass a dummy command to the ssh tunnel setup

* Address analyzer lint

* Update fuchsia_remote_debug_protocol
parent c816cee2
...@@ -432,9 +432,10 @@ class _PortForwarder { ...@@ -432,9 +432,10 @@ class _PortForwarder {
'_PortForwarder failed to find a local port for $address:$remotePort'); '_PortForwarder failed to find a local port for $address:$remotePort');
return new _PortForwarder._(null, 0, 0, null, null); return new _PortForwarder._(null, 0, 0, null, null);
} }
const String dummyRemoteCommand = 'date';
final List<String> command = <String>[ final List<String> command = <String>[
'ssh', '-F', sshConfig, '-nNT', '-vvv', 'ssh', '-F', sshConfig, '-nNT', '-vvv', '-f',
'-L', '$localPort:$ipv4Loopback:$remotePort', address]; '-L', '$localPort:$ipv4Loopback:$remotePort', address, dummyRemoteCommand];
printTrace("_PortForwarder running '${command.join(' ')}'"); printTrace("_PortForwarder running '${command.join(' ')}'");
final Process process = await processManager.start(command); final Process process = await processManager.start(command);
process.stderr process.stderr
......
...@@ -280,11 +280,14 @@ class _SshPortForwarder implements PortForwarder { ...@@ -280,11 +280,14 @@ class _SshPortForwarder implements PortForwarder {
} }
final String targetAddress = final String targetAddress =
isIpV6 && interface.isNotEmpty ? '$address%$interface' : address; isIpV6 && interface.isNotEmpty ? '$address%$interface' : address;
const String dummyRemoteCommand = 'date';
command.addAll(<String>[ command.addAll(<String>[
'-nNT', '-nNT',
'-f',
'-L', '-L',
formattedForwardingUrl, formattedForwardingUrl,
targetAddress, targetAddress,
dummyRemoteCommand,
]); ]);
_log.fine("_SshPortForwarder running '${command.join(' ')}'"); _log.fine("_SshPortForwarder running '${command.join(' ')}'");
final Process process = await _processManager.start(command); final Process process = await _processManager.start(command);
......
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