gnodet commented on PR #13924: URL: https://github.com/apache/maven/pull/13924#issuecomment-6746278536
Fixed — two commits: **1. Resource leak** — moved `context.closeables.add(MessageUtils::systemUninstall)` from `awaitTerminal()` into `startTerminalBuild()` (immediately after `systemInstall()` returns). This ensures cleanup is registered even if an `ExitException` from `helpOrVersionAndMayExit` / `preCommands` exits before `awaitTerminal` runs. **2. NPE on `--help`/`--version`** — moved `awaitTerminal(context)` above `helpOrVersionAndMayExit(context)`. `context.terminal` is now set before any writer is dereferenced. The FFM thread still races against `configureLogging()` + `activateLogging()`, which is real serial work. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
