scala-cli
scala-cli copied to clipboard
`-color` isn't respected for non-`scalac` output
Version(s) 0.1.14
Describe the bug
Passing -O -color is only respected for raw scalac unaltered scala compiler outputs.
It is ignored in all other cases.
To Reproduce
▶ scala-cli -e 'xyz'-O -color -O never
Compiling project (Scala 3.2.0, JVM)
[error] snippet:1:13: Not found: xyz
Error compiling project (Scala 3.2.0, JVM)
Compilation failed
The error keyword in the output will be colored red, despite the -O -color -O never
Example for when it is respected
▶ scala-cli -Xshow-phases -O -color -O never
phase name description
---------- -----------
parser scan and parse sources
typer type the trees
inlinedPositions check inlined positions
This produces raw scalac output and the -color option is, indeed, respected here.
Expected behaviour
-color should be respected at all times for all scala-cli outputs.
additionally, it shouldn't require passing it through -O