From 64841f630900ddf09c272a4a526f4a2fd80aedda Mon Sep 17 00:00:00 2001 From: Clement Skau Date: Tue, 5 Oct 2021 19:28:04 +0200 Subject: [PATCH] Adds analyze_sample_code exit for when pub fails (#91024) --- dev/bots/analyze_sample_code.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/bots/analyze_sample_code.dart b/dev/bots/analyze_sample_code.dart index 73669aabf7..2e750d30a1 100644 --- a/dev/bots/analyze_sample_code.dart +++ b/dev/bots/analyze_sample_code.dart @@ -121,7 +121,7 @@ Future main(List arguments) async { if (parsedArguments['global-activate-snippets']! as bool) { try { - Process.runSync( + final ProcessResult activateResult = Process.runSync( Platform.resolvedExecutable, [ 'pub', @@ -132,6 +132,9 @@ Future main(List arguments) async { ], workingDirectory: _flutterRoot, ); + if (activateResult.exitCode != 0) { + exit(activateResult.exitCode); + } } on ProcessException catch (e) { stderr.writeln('Unable to global activate snippets package at version $_snippetsActivateVersion: $e'); exit(1);