Throw error early rather than warning

This commit is contained in:
Henry Mercer
2026-04-08 16:33:19 +01:00
parent 5f323cad05
commit e452857e57
2 changed files with 14 additions and 14 deletions
+5 -5
View File
@@ -110299,6 +110299,11 @@ async function run(startedAt) {
enableFileCoverageInformation: fileCoverageResult.enabled,
logger
});
if (config.languages.includes("swift" /* swift */) && process.platform === "linux") {
throw new ConfigurationError(
`Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner.`
);
}
if (repositoryPropertiesResult.isFailure()) {
addNoLanguageDiagnostic(
config,
@@ -110383,11 +110388,6 @@ async function run(startedAt) {
"Passing the GOFLAGS env parameter to the init action is deprecated. Please move this to the analyze action."
);
}
if (config.languages.includes("swift" /* swift */) && process.platform === "linux") {
logger.warning(
`Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner if this affects you.`
);
}
if (config.languages.includes("go" /* go */) && process.platform === "linux") {
try {
const goBinaryPath = await io6.which("go", true);
+9 -9
View File
@@ -389,6 +389,15 @@ async function run(startedAt: Date) {
logger,
});
if (
config.languages.includes(KnownLanguage.swift) &&
process.platform === "linux"
) {
throw new ConfigurationError(
`Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner.`,
);
}
if (repositoryPropertiesResult.isFailure()) {
addNoLanguageDiagnostic(
config,
@@ -499,15 +508,6 @@ async function run(startedAt: Date) {
);
}
if (
config.languages.includes(KnownLanguage.swift) &&
process.platform === "linux"
) {
logger.warning(
`Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner if this affects you.`,
);
}
if (
config.languages.includes(KnownLanguage.go) &&
process.platform === "linux"