diff --git a/engine/src/flutter/ci/bin/lint.dart b/engine/src/flutter/ci/bin/lint.dart index 04ff295acd..321bd3d998 100644 --- a/engine/src/flutter/ci/bin/lint.dart +++ b/engine/src/flutter/ci/bin/lint.dart @@ -11,7 +11,7 @@ import 'dart:async' show Completer; import 'dart:convert' show jsonDecode, utf8, LineSplitter; -import 'dart:io' show File, exit, Directory, FileSystemEntity, Platform, stderr; +import 'dart:io' show File, exit, Directory, FileSystemEntity, Platform, stderr, exitCode; import 'package:args/args.dart'; import 'package:path/path.dart' as path; @@ -223,7 +223,6 @@ void main(List arguments) async { 'commands associated with them and can be lint checked.'); } - int exitCode = 0; final List jobs = []; for (Command command in changedFileBuildCommands) { final String relativePath = path.relative(command.file.path, from: repoPath.parent.path); @@ -245,16 +244,21 @@ void main(List arguments) async { final ProcessPool pool = ProcessPool(); await for (final WorkerJob job in pool.startWorkers(jobs)) { - if (job.result?.stdout.isEmpty ?? true) { + if (job.result?.exitCode == 0) { continue; } - print('āŒ Failures for ${job.name}:'); - print(job.result.stdout); + if (job.result == null) { + print('\nā— A clang-tidy job failed to run, aborting:\n${job.exception}'); + exitCode = 1; + break; + } else { + print('āŒ Failures for ${job.name}:'); + print(job.result.stdout); + } exitCode = 1; } print('\n'); if (exitCode == 0) { print('No lint problems found.'); } - exit(exitCode); } diff --git a/engine/src/flutter/ci/pubspec.yaml b/engine/src/flutter/ci/pubspec.yaml index eba8dd49bf..1ef6eaaa58 100644 --- a/engine/src/flutter/ci/pubspec.yaml +++ b/engine/src/flutter/ci/pubspec.yaml @@ -8,7 +8,7 @@ dependencies: args: ^1.6.0 path: ^1.7.0 isolate: ^2.0.3 - process_runner: ^3.0.0 + process_runner: ^3.1.0 environment: sdk: '>=2.8.0 <3.0.0'