gnodet commented on PR #13924: URL: https://github.com/apache/maven/pull/13924#issuecomment-6749045591
Fixed — 1 commit, 2 files. The `else` branch in `awaitTerminal()` was keyed on `context.terminal == null`, which broke when the background thread's `doConfigureWithTerminal` callback set `context.terminal` *before* `awaitTerminal()` ran (a realistic race on exec/JNI provider). In that case the else branch fired, calling `doConfigureWithTerminal` a second time and silently skipping `ProjectBuildLogAppender`. **Fix:** added `LookupContext.terminalBuildStarted` boolean, set in `startTerminalBuild()`. `awaitTerminal()` now branches on *that* flag instead of `context.terminal` nullness: - `terminalBuildStarted = true` → always call `MessageUtils.getTerminal()` (which blocks until done and returns the canonical terminal instance) then create the appender — regardless of whether the background callback already set `context.terminal`. - `terminalBuildStarted = false`, `terminal != null` → embedder pre-set path, `doConfigureWithTerminal` only, no appender. -- 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]
