Fix misleading error for malformed local workflow paths (#221)

This commit is contained in:
eric sciple
2025-12-03 10:40:31 -06:00
committed by GitHub
parent 216fcbb8c4
commit 37ba6ab105
2 changed files with 29 additions and 1 deletions
+6
View File
@@ -354,6 +354,12 @@ function validateWorkflowUsesFormat(diagnostics: Diagnostic[], token: StringToke
return;
}
// Malformed local workflow reference (starts with ./ but not in .github/workflows)
if (uses.startsWith("./")) {
addWorkflowUsesFormatError(diagnostics, token, "local workflow references must be rooted in '.github/workflows'");
return;
}
// Remote workflow reference: must have @ for version
const atSegments = uses.split("@");
if (atSegments.length === 1) {