[flutter_tools] configure screenshot on failure for all tasks (#68260)

This commit is contained in:
Jonah Williams 2020-10-15 18:53:00 -07:00 committed by GitHub
parent acde65d14a
commit d7f80fcdd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,6 +282,7 @@ Future<Process> startProcess(
+ (environment != null ? ' with environment $environment' : '')); + (environment != null ? ' with environment $environment' : ''));
environment ??= <String, String>{}; environment ??= <String, String>{};
environment['BOT'] = isBot ? 'true' : 'false'; environment['BOT'] = isBot ? 'true' : 'false';
environment['FLUTTER_IOS_SCREENSHOT_ON_CONNECTION_FAILURE'] = 'true';
final Process process = await _processManager.start( final Process process = await _processManager.start(
<String>[executable, ...arguments], <String>[executable, ...arguments],
environment: environment, environment: environment,
@ -447,7 +448,7 @@ Future<int> flutter(String command, {
}) { }) {
final List<String> args = flutterCommandArgs(command, options); final List<String> args = flutterCommandArgs(command, options);
return exec(path.join(flutterDirectory.path, 'bin', 'flutter'), args, return exec(path.join(flutterDirectory.path, 'bin', 'flutter'), args,
canFail: canFail, environment: <String, String>{...?environment, 'FLUTTER_IOS_SCREENSHOT_ON_CONNECTION_FAILURE': 'true'}); canFail: canFail, environment: environment);
} }
/// Runs a `flutter` command and returns the standard output as a string. /// Runs a `flutter` command and returns the standard output as a string.