From bc36ca9619bd8caeeb028fb80614d230ca3b5114 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Tue, 13 Feb 2018 09:44:27 +0100 Subject: [PATCH] Change the default for pub tracing to false for non-bot runs (#14552) * Change the default for pub tracing to false for non-bot runs * Review feedback: update docs * Review feedback --- packages/flutter_tools/lib/src/dart/pub.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/lib/src/dart/pub.dart b/packages/flutter_tools/lib/src/dart/pub.dart index 10dd247f27..6d2c2b3f6e 100644 --- a/packages/flutter_tools/lib/src/dart/pub.dart +++ b/packages/flutter_tools/lib/src/dart/pub.dart @@ -124,7 +124,8 @@ typedef String MessageFilter(String message); /// applying filtering. The pub process will not receive anything on its stdin stream. /// /// The `--trace` argument is passed to `pub` (by mutating the provided -/// `arguments` list) unless `showTraceForErrors` is false. +/// `arguments` list) when `showTraceForErrors` is true, and when `showTraceForErrors` +/// is null/unset, and `isRunningOnBot` is true. /// /// [context] provides extra information to package server requests to /// understand usage. @@ -134,8 +135,10 @@ Future pub(List arguments, { MessageFilter filter, String failureMessage: 'pub failed', @required bool retry, - bool showTraceForErrors: true, + bool showTraceForErrors, }) async { + showTraceForErrors ??= isRunningOnBot; + if (showTraceForErrors) arguments.insert(0, '--trace'); int attempts = 0;