mirror of
https://github.com/github/codeql-action.git
synced 2026-04-28 01:48:48 +00:00
Add debugging options to JAVA_TOOL_OPTIONS when FF is enabled
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user