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

20
src/tools-features.ts Normal file
View file

@ -0,0 +1,20 @@
import { VersionInfo } from "./codeql";
export enum ToolsFeature {
FeaturesInVersionResult = "featuresInVersionResult",
IndirectTracingSupportsStaticBinaries = "indirectTracingSupportsStaticBinaries",
}
/**
* Determines if the given feature is supported by the CLI.
*
* @param versionInfo Version information, including features, returned by the CLI.
* @param feature The feature to check for.
* @returns True if the feature is supported or false otherwise.
*/
export function isSupportedToolsFeature(
versionInfo: VersionInfo,
feature: ToolsFeature,
): boolean {
return !!versionInfo.features && versionInfo.features[feature];
}