Skip to content

Commit caf666f

Browse files
godofredocexaby73
authored andcommitted
Do not use colors in output if running from CI. (flutter#122645)
Do not use colors in output if running from CI.
1 parent 1942de6 commit caf666f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dev/bots/utils.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import 'package:meta/meta.dart';
1212

1313
const Duration _quietTimeout = Duration(minutes: 10); // how long the output should be hidden between calls to printProgress before just being verbose
1414

15-
final bool hasColor = stdout.supportsAnsiEscapes;
15+
// If running from LUCI set to False.
16+
final bool isLuci = Platform.environment['LUCI_CI'] == 'True';
17+
final bool hasColor = stdout.supportsAnsiEscapes && !isLuci;
18+
1619

1720
final String bold = hasColor ? '\x1B[1m' : ''; // shard titles
1821
final String red = hasColor ? '\x1B[31m' : ''; // errors

0 commit comments

Comments
 (0)