Add debugging options to JAVA_TOOL_OPTIONS when FF is enabled

This commit is contained in:
Michael B. Gale
2026-02-15 18:12:51 +00:00
parent 595ce2dc3e
commit e21e4ca93f
2 changed files with 28 additions and 0 deletions
+14
View File
@@ -95,6 +95,7 @@ import {
BuildMode,
GitHubVersion,
Result,
getOptionalEnvVar,
} from "./util";
import { checkWorkflow } from "./workflow";
@@ -753,6 +754,19 @@ async function run(startedAt: Date) {
}
}
// Enable Java network debugging if the FF is enabled.
if (await features.getValue(Feature.JavaNetworkDebugging)) {
// Get the existing value of `JAVA_OPTS`, if any.
const existingJavaToolOptions =
getOptionalEnvVar("JAVA_TOOL_OPTIONS") || "";
// Add the network debugging options.
core.exportVariable(
"JAVA_TOOL_OPTIONS",
`${existingJavaToolOptions} -Djavax.net.debug=ssl,handshake,certpath`,
);
}
// Write diagnostics to the database that we previously stored in memory because the database
// did not exist until now.
flushDiagnostics(config);