You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "cstamas (via GitHub)" <gi...@apache.org> on 2024/10/15 14:59:02 UTC

[PR] Cleanup after last commit [maven]

cstamas opened a new pull request, #1798:
URL: https://github.com/apache/maven/pull/1798

   LookupInvoker does terminal stuff now, remove them from "early" entry classes, also adopt mvnenc


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cleanup after last commit [maven]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #1798:
URL: https://github.com/apache/maven/pull/1798


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cleanup after last commit [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1798:
URL: https://github.com/apache/maven/pull/1798#discussion_r1801385119


##########
maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/DefaultEncryptInvoker.java:
##########
@@ -119,11 +116,11 @@ protected int doExecute(LocalContext context) throws Exception {
         context.addInHeader("");
         try {
             Thread executeThread = Thread.currentThread();
-            terminal.handle(Terminal.Signal.INT, signal -> executeThread.interrupt());
+            context.terminal.handle(Terminal.Signal.INT, signal -> executeThread.interrupt());
             ConsolePrompt.UiConfig config;
-            if (terminal.getType().equals(Terminal.TYPE_DUMB)
-                    || terminal.getType().equals(Terminal.TYPE_DUMB_COLOR)) {
-                System.out.println(terminal.getName() + ": " + terminal.getType());
+            if (context.terminal.getType().equals(Terminal.TYPE_DUMB)
+                    || context.terminal.getType().equals(Terminal.TYPE_DUMB_COLOR)) {
+                System.out.println(context.terminal.getName() + ": " + context.terminal.getType());

Review Comment:
   All `System.out` should be replaced with `context.terminal.writer()`



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cleanup after last commit [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1798:
URL: https://github.com/apache/maven/pull/1798#discussion_r1801389897


##########
maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java:
##########
@@ -413,6 +413,7 @@ protected void helpOrVersionAndMayExit(C context) throws Exception {
             } else {
                 context.terminal.writer().println(CLIReportingUtils.showVersion());
             }
+            context.terminal.writer().flush();

Review Comment:
   I would add a flush after displaying the help, just so that we don't rely on `displayHelp` to call `flush`...



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org