Unverified Commit 83b9497c authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

do not exit tool if fuchsia workflow fails (#26589)

parent 800a6e16
......@@ -115,6 +115,9 @@ class FuchsiaDevices extends PollingDeviceDiscovery {
return <Device>[];
}
final String text = await fuchsiaSdk.listDevices();
if (text == null) {
return <Device>[];
}
final List<FuchsiaDevice> devices = parseListDevices(text);
return devices;
}
......
......@@ -5,12 +5,12 @@
import 'dart:async';
import 'dart:convert';
import '../base/common.dart';
import '../base/context.dart';
import '../base/file_system.dart';
import '../base/io.dart';
import '../base/process.dart';
import '../base/process_manager.dart';
import '../globals.dart';
/// The [FuchsiaSdk] instance.
FuchsiaSdk get fuchsiaSdk => context[FuchsiaSdk];
......@@ -33,8 +33,8 @@ class FuchsiaSdk {
final String path = fuchsiaArtifacts.devFinder.absolute.path;
final RunResult process = await runAsync(<String>[path, 'list', '-full']);
return process.stdout.trim();
} on ArgumentError catch (exception) {
throwToolExit('$exception');
} catch (exception) {
printTrace('$exception');
}
return null;
}
......@@ -57,8 +57,8 @@ class FuchsiaSdk {
controller.addStream(process.stdout.transform(utf8.decoder).transform(const LineSplitter()));
});
return controller.stream;
} on ArgumentError catch (exception) {
throwToolExit('$exception');
} catch (exception) {
printTrace('$exception');
}
return null;
}
......
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