communicate fuchsia error states to developers (#24191)
This commit is contained in:
@@ -203,6 +203,9 @@ class FuchsiaDevice extends Device {
|
||||
final RunResult result = await runAsync(<String>[
|
||||
'ssh', '-F', fuchsiaArtifacts.sshConfig.absolute.path, id, command]);
|
||||
if (result.exitCode != 0) {
|
||||
if (result.stderr.contains('/tmp/dart.services: No such file or directory')) {
|
||||
throwToolExit('No Dart Observatories found. Are you running a debug build?');
|
||||
}
|
||||
throwToolExit('Command failed: $command\nstdout: ${result.stdout}\nstderr: ${result.stderr}');
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,10 @@ class FuchsiaArtifacts {
|
||||
File get sshConfig {
|
||||
if (_sshConfig == null) {
|
||||
final String buildDirectory = platform.environment['BUILD_DIR'];
|
||||
if (buildDirectory == null) {
|
||||
throwToolExit('BUILD_DIR must be supplied to locate SSH keys. For example:\n'
|
||||
' export BUILD_DIR=path/to/fuchsia/out/x64\n');
|
||||
}
|
||||
_sshConfig = fs.file('$buildDirectory/ssh-keys/ssh_config');
|
||||
}
|
||||
return _sshConfig;
|
||||
|
||||
Reference in New Issue
Block a user