Add CLI feature flag to disable Go workaround

This commit is contained in:
Michael B. Gale 2023-10-04 17:40:41 +01:00
parent 604448043e
commit abb71f14cf
No known key found for this signature in database
GPG key ID: FF5E2765BD00628F
6 changed files with 56 additions and 3 deletions

View file

@ -28,6 +28,7 @@ import {
getActionsStatus,
sendStatusReport,
} from "./status-report";
import { ToolsFeature, isSupportedToolsFeature } from "./tools-features";
import { getTotalCacheSize } from "./trap-caching";
import {
checkDiskUsage,
@ -315,6 +316,9 @@ async function run() {
}
try {
// Query CLI for supported features
const versionInfo = await codeql.getVersion();
// Forward Go flags
const goFlags = process.env["GOFLAGS"];
if (goFlags) {
@ -327,7 +331,11 @@ async function run() {
// https://github.com/github/codeql-team/issues/2411
if (
config.languages.includes(Language.go) &&
process.platform === "linux"
process.platform === "linux" &&
!isSupportedToolsFeature(
versionInfo,
ToolsFeature.IndirectTracingSupportsStaticBinaries,
)
) {
try {
const goBinaryPath = await safeWhich("go");