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.