File tree 3 files changed +6
-14
lines changed
3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,7 @@ describe('installer tests', () => {
88
88
}
89
89
} , 100000 ) ;
90
90
91
- // Usage of pre-cached Node.js is temporarily disabled.
92
- xit ( 'Uses version of node installed in cache' , async ( ) => {
91
+ it ( 'Uses version of node installed in cache' , async ( ) => {
93
92
const nodeDir : string = path . join ( toolDir , 'node' , '250.0.0' , os . arch ( ) ) ;
94
93
await io . mkdirP ( nodeDir ) ;
95
94
fs . writeFileSync ( `${ nodeDir } .complete` , 'hello' ) ;
@@ -112,8 +111,7 @@ describe('installer tests', () => {
112
111
return ;
113
112
} ) ;
114
113
115
- // Usage of pre-cached Node.js is temporarily disabled.
116
- xit ( 'Resolves semantic versions of node installed in cache' , async ( ) => {
114
+ it ( 'Resolves semantic versions of node installed in cache' , async ( ) => {
117
115
const nodeDir : string = path . join ( toolDir , 'node' , '252.0.0' , os . arch ( ) ) ;
118
116
await io . mkdirP ( nodeDir ) ;
119
117
fs . writeFileSync ( `${ nodeDir } .complete` , 'hello' ) ;
Original file line number Diff line number Diff line change @@ -12231,8 +12231,7 @@ function getNode(versionSpec) {
12231
12231
let toolPath;
12232
12232
toolPath = tc.find('node', versionSpec);
12233
12233
// If not found in cache, download
12234
- // Usage of pre-cached Node.js is temporarily disabled.
12235
- if (true) {
12234
+ if (!toolPath) {
12236
12235
let version;
12237
12236
const c = semver.clean(versionSpec) || '';
12238
12237
// If explicit version
@@ -12249,8 +12248,7 @@ function getNode(versionSpec) {
12249
12248
// check cache
12250
12249
toolPath = tc.find('node', version);
12251
12250
}
12252
- // Usage of pre-cached Node.js is temporarily disabled.
12253
- if (true) {
12251
+ if (!toolPath) {
12254
12252
// download, extract, cache
12255
12253
toolPath = yield acquireNode(version);
12256
12254
}
@@ -12344,7 +12342,6 @@ function acquireNode(version) {
12344
12342
let downloadUrl = `https://nodejs.org/dist/v${version}/${urlFileName}`;
12345
12343
let downloadPath;
12346
12344
try {
12347
- core.info(`Downloading ${downloadUrl}`);
12348
12345
downloadPath = yield tc.downloadTool(downloadUrl);
12349
12346
}
12350
12347
catch (err) {
Original file line number Diff line number Diff line change @@ -25,8 +25,7 @@ export async function getNode(versionSpec: string) {
25
25
toolPath = tc . find ( 'node' , versionSpec ) ;
26
26
27
27
// If not found in cache, download
28
- // Usage of pre-cached Node.js is temporarily disabled.
29
- if ( true ) {
28
+ if ( ! toolPath ) {
30
29
let version : string ;
31
30
const c = semver . clean ( versionSpec ) || '' ;
32
31
// If explicit version
@@ -46,8 +45,7 @@ export async function getNode(versionSpec: string) {
46
45
toolPath = tc . find ( 'node' , version ) ;
47
46
}
48
47
49
- // Usage of pre-cached Node.js is temporarily disabled.
50
- if ( true ) {
48
+ if ( ! toolPath ) {
51
49
// download, extract, cache
52
50
toolPath = await acquireNode ( version ) ;
53
51
}
@@ -148,7 +146,6 @@ async function acquireNode(version: string): Promise<string> {
148
146
let downloadPath : string ;
149
147
150
148
try {
151
- core . info ( `Downloading ${ downloadUrl } ` ) ;
152
149
downloadPath = await tc . downloadTool ( downloadUrl ) ;
153
150
} catch ( err ) {
154
151
if ( err instanceof tc . HTTPError && err . httpStatusCode == 404 ) {
You can’t perform that action at this time.
0 commit comments