Fixes module id coloring on Maven transfer.

The module id coloring was not consistent during transfer
and it caused "vibrating" effect.
This commit is contained in:
Tamas Cservenak
2022-09-10 11:30:28 +02:00
parent 309d0c7eff
commit 1511066266

View File

@@ -90,6 +90,7 @@ public class TerminalOutput implements ClientOutput {
private static final AttributedStyle GREEN_FOREGROUND = new AttributedStyle().foreground(AttributedStyle.GREEN);
private static final AttributedStyle CYAN_FOREGROUND = new AttributedStyle().foreground(AttributedStyle.CYAN);
private static final AttributedStyle WHITE_FOREGROUND = new AttributedStyle().foreground(AttributedStyle.WHITE);
private final Terminal terminal;
private final Terminal.SignalHandler previousIntHandler;
@@ -767,12 +768,15 @@ public class TerminalOutput implements ClientOutput {
if (transfer != null) {
asb
.append(':')
.style(CYAN_FOREGROUND)
.append(String.format(artifactIdFormat, prj.id))
.style(WHITE_FOREGROUND)
.append(transfer);
} else if (execution == null) {
asb
.append(':')
.append(prj.id);
.style(CYAN_FOREGROUND)
.append(String.format(artifactIdFormat, prj.id));
} else {
asb
.append(':')