MartinKanters commented on pull request #473:
URL: https://github.com/apache/maven/pull/473#issuecomment-844814841
> @MartinKanters it seems to work. I've forced pushed the change.
Nice, I definitely prefer defaulting to the old width. I see that you are
not targeting any customized ITs and removed the changes in the unit tests. To
me that proves that it's backwards compatible for non-ansi terminals.
And now that we have a constructor where we can put in the values, we can
create some unit tests which verify that the terminal width is set correctly in
all scenarios. I'm sorry that I'm asking for more changes on a PR that
@mthmulders and I initially delivered... :)
> Fwiw, there is a minor problem with the terminal width which can be
improved later: ideally, we'd make the difference between the `System.out` and
`System.err` streams. Currently, `MessageUtils.getTerminalWidth()` relies on
`AnsiConsole.getTerminalWidth()` which first tries the get the width of the
terminal using `System.out` and then try with `System.err`. The downside is
that if the output is redirected using `mvn > out.txt` or even simply `mvn -l
out.txt`, then the computed terminal width is not relevant. It's no big deal
though. This also makes we wonder if the `MavenCli` should use `System.err` to
print non standard output (i.e. version, help, etc...) instead of
`System.out`...
Right, that indeed sounds like something that can be dealt with later. About
the last point we can also create a thread on the dev mailing list.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]