mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
Use ANSI colors for test results; more polish (#771)
Any thrown Pkl Errors are colored in the simple test report! Also: * Refactor `TextFormatter` to be more generic; rename to `TextFormattingStringBuilder` * Adjust test report slightly (no emojis, add more spacing). * Introduce `ColorTheme` class. * Make stack frame descriptors colored as "faint" Also: this changes the summary so it summarizes _all_ modules, rather than a summary per module. --------- Co-authored-by: Islon Scherer <islonscherer@gmail.com> Co-authored-by: Philip K.F. Hölzenspies <holzensp@gmail.com>
This commit is contained in:
@@ -164,6 +164,8 @@ abstract class CliCommand(protected val cliOptions: CliBaseOptions) {
|
||||
)
|
||||
}
|
||||
|
||||
protected val useColor: Boolean by lazy { cliOptions.color?.hasColor() ?: false }
|
||||
|
||||
private val proxyAddress by lazy {
|
||||
cliOptions.httpProxy
|
||||
?: project?.evaluatorSettings?.http?.proxy?.address ?: settings.http?.proxy?.address
|
||||
@@ -284,7 +286,7 @@ abstract class CliCommand(protected val cliOptions: CliBaseOptions) {
|
||||
.setEnvironmentVariables(environmentVariables)
|
||||
.addModuleKeyFactories(moduleKeyFactories(modulePathResolver))
|
||||
.addResourceReaders(resourceReaders(modulePathResolver))
|
||||
.setColor(cliOptions.color?.hasColor() ?: false)
|
||||
.setColor(useColor)
|
||||
.setLogger(Loggers.stdErr())
|
||||
.setTimeout(cliOptions.timeout)
|
||||
.setModuleCacheDir(moduleCacheDir)
|
||||
|
||||
Reference in New Issue
Block a user