[tool] Conditionalize color on stdout (#4436)

Refactors colorization to a centralized utility file, and makes it all conditional on `stdout` having ANSI escape support. This makes the output more readable on LUCI, which unlike the Cirrus log display doesn't handle ANSI.

Fixes https://github.com/flutter/flutter/issues/89392
This commit is contained in:
stuartmorgan
2023-07-11 15:02:59 -04:00
committed by GitHub
parent 404084cb0a
commit 28c419d2ab
35 changed files with 187 additions and 26 deletions

View File

@ -9,7 +9,7 @@ import 'package:meta/meta.dart';
import 'package:yaml/yaml.dart';
import 'package:yaml_edit/yaml_edit.dart';
import 'common/core.dart';
import 'common/output_utils.dart';
import 'common/package_looping_command.dart';
import 'common/pub_utils.dart';
import 'common/repository_package.dart';