mirror of
https://github.com/github/codeql-action.git
synced 2026-11-05 04:29:40 +00:00
Return early if we are not on macOS to avoid unnecessary work
This commit is contained in:
5
lib/entry-points.js
generated
5
lib/entry-points.js
generated
@@ -193981,6 +193981,9 @@ async function checkRunnerSupportsTracedAnalysis(action, config, codeql) {
|
||||
if (config.buildMode !== void 0 && config.buildMode === "none") {
|
||||
return;
|
||||
}
|
||||
if (version === void 0) {
|
||||
return;
|
||||
}
|
||||
const tracedLanguages = await hasTracedLanguages(config, codeql);
|
||||
if (tracedLanguages.length === 0) {
|
||||
return;
|
||||
@@ -193992,7 +193995,7 @@ async function checkRunnerSupportsTracedAnalysis(action, config, codeql) {
|
||||
action.logger.warning(
|
||||
`Unable to determine version of macOS, got: ${version}`
|
||||
);
|
||||
} else if (version !== void 0 && version.major >= UNSUPPORTED_DARWIN_FOR_TRACED) {
|
||||
} else if (version.major >= UNSUPPORTED_DARWIN_FOR_TRACED) {
|
||||
handleUnsupportedVersion(
|
||||
action.logger,
|
||||
config,
|
||||
|
||||
@@ -130,6 +130,11 @@ export async function checkRunnerSupportsTracedAnalysis(
|
||||
return;
|
||||
}
|
||||
|
||||
// These checks don't apply if we are not on macOS.
|
||||
if (version === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If none of the languages are traced, then we can skip the compatibility checks below as well.
|
||||
const tracedLanguages = await hasTracedLanguages(config, codeql);
|
||||
if (tracedLanguages.length === 0) {
|
||||
@@ -144,10 +149,7 @@ export async function checkRunnerSupportsTracedAnalysis(
|
||||
action.logger.warning(
|
||||
`Unable to determine version of macOS, got: ${version}`,
|
||||
);
|
||||
} else if (
|
||||
version !== undefined &&
|
||||
version.major >= UNSUPPORTED_DARWIN_FOR_TRACED
|
||||
) {
|
||||
} else if (version.major >= UNSUPPORTED_DARWIN_FOR_TRACED) {
|
||||
handleUnsupportedVersion(
|
||||
action.logger,
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user