mirror of
https://gitea.com/actions/setup-node.git
synced 2025-07-06 04:39:25 +08:00
Stricter check and cleaner messaging
This commit is contained in:
@ -193,7 +193,7 @@ export async function getNode(
|
||||
}
|
||||
|
||||
function isLtsAlias(versionSpec: string): boolean {
|
||||
return versionSpec.startsWith('lts');
|
||||
return versionSpec.startsWith('lts/');
|
||||
}
|
||||
|
||||
function getManifest(auth: string | undefined): Promise<tc.IToolRelease[]> {
|
||||
@ -210,7 +210,7 @@ function resolveLtsAliasFromManifest(
|
||||
|
||||
if (!alias) {
|
||||
throw new Error(
|
||||
`Unexpected LTS alias '${alias}' for Node version '${versionSpec}'`
|
||||
`Unable to parse LTS alias for Node version '${versionSpec}'`
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user