You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('reports when download failed but version exists',async()=>{
361
+
os.platform='linux';
362
+
os.arch='x64';
363
+
364
+
// a version which is not in the manifest but is in node dist
365
+
constversionSpec='11.15.0';
366
+
367
+
inputs['node-version']=versionSpec;
368
+
inputs['always-auth']=false;
369
+
inputs['token']='faketoken';
370
+
371
+
// ... but not in the local cache
372
+
findSpy.mockImplementation(()=>'');
373
+
374
+
dlSpy.mockImplementationOnce(async()=>{
375
+
thrownewtc.HTTPError(404);
376
+
});
377
+
378
+
awaitmain.run();
379
+
380
+
expect(getManifestSpy).toHaveBeenCalled();
381
+
expect(logSpy).toHaveBeenCalledWith(
382
+
`Attempting to download ${versionSpec}...`
383
+
);
384
+
expect(logSpy).toHaveBeenCalledWith(
385
+
'Not found in manifest. Falling back to download directly from Node'
386
+
);
387
+
expect(dlSpy).toHaveBeenCalled();
388
+
expect(warningSpy).toHaveBeenCalledWith(
389
+
`Node version ${versionSpec} for platform ${os.platform} and architecture ${os.arch} was found but failed to download. `+
390
+
'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. '+
391
+
'To resolve this issue you may either fall back to the older version or try again later.'
392
+
);
393
+
});
394
+
360
395
it('acquires specified architecture of node',async()=>{
if (error instanceof tc.HTTPError && error.httpStatusCode === 404) {
72846
+
core.warning(`Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` +
72847
+
'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. ' +
72848
+
'To resolve this issue you may either fall back to the older version or try again later.');
72849
+
}
72850
+
throw error;
72851
+
}
72852
+
});
72853
+
}
72832
72854
evaluateVersions(versions) {
72833
72855
let version = '';
72834
72856
if (this.isLatestSyntax(this.nodeInfo.versionSpec)) {
`Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. `+
153
+
'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. '+
154
+
'To resolve this issue you may either fall back to the older version or try again later.'
0 commit comments