File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ export async function getNode(
66
66
}
67
67
}
68
68
69
- if ( [ 'current' , 'latest' , 'node' ] . includes ( versionSpec ) ) {
70
- versionSpec = await queryDistForMatch ( versionSpec , arch ) ;
69
+ if ( [ 'current' , 'latest' , 'node' ] . includes ( versionSpec ) ) {
70
+ versionSpec = await queryDistForMatch ( versionSpec , arch ) ;
71
71
core . info ( `getting latest node version...` ) ;
72
72
}
73
73
@@ -378,6 +378,15 @@ async function queryDistForMatch(
378
378
let versions : string [ ] = [ ] ;
379
379
let nodeVersions = await getVersionsFromDist ( ) ;
380
380
381
+ if (
382
+ versionSpec === 'current' ||
383
+ versionSpec === 'latest' ||
384
+ versionSpec === 'node'
385
+ ) {
386
+ core . info ( `getting latest node version...` ) ;
387
+ return nodeVersions [ 0 ] . version ;
388
+ }
389
+
381
390
nodeVersions . forEach ( ( nodeVersion : INodeVersion ) => {
382
391
// ensure this version supports your os and platform
383
392
if ( nodeVersion . files . indexOf ( dataFileName ) >= 0 ) {
You can’t perform that action at this time.
0 commit comments