From d7f80fcdd3789e42f206c3ac87cb81cc2883bde0 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 15 Oct 2020 18:53:00 -0700 Subject: [PATCH] [flutter_tools] configure screenshot on failure for all tasks (#68260) --- dev/devicelab/lib/framework/utils.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/devicelab/lib/framework/utils.dart b/dev/devicelab/lib/framework/utils.dart index 1f96e8b626d..e60753c2818 100644 --- a/dev/devicelab/lib/framework/utils.dart +++ b/dev/devicelab/lib/framework/utils.dart @@ -282,6 +282,7 @@ Future startProcess( + (environment != null ? ' with environment $environment' : '')); environment ??= {}; environment['BOT'] = isBot ? 'true' : 'false'; + environment['FLUTTER_IOS_SCREENSHOT_ON_CONNECTION_FAILURE'] = 'true'; final Process process = await _processManager.start( [executable, ...arguments], environment: environment, @@ -447,7 +448,7 @@ Future flutter(String command, { }) { final List args = flutterCommandArgs(command, options); return exec(path.join(flutterDirectory.path, 'bin', 'flutter'), args, - canFail: canFail, environment: {...?environment, 'FLUTTER_IOS_SCREENSHOT_ON_CONNECTION_FAILURE': 'true'}); + canFail: canFail, environment: environment); } /// Runs a `flutter` command and returns the standard output as a string.