1
0
Fork 0
mirror of https://github.com/actions/setup-node synced 2024-11-09 23:22:41 +00:00

feat: add arch to downloading message

This commit is contained in:
Amin Yahyaabadi 2020-09-03 07:50:29 -05:00
parent 3eb4bc9d68
commit c7e4d38541
2 changed files with 8 additions and 4 deletions

View file

@ -248,7 +248,7 @@ describe('setup-node', () => {
expect(dlSpy).toHaveBeenCalled(); expect(dlSpy).toHaveBeenCalled();
expect(exSpy).toHaveBeenCalled(); expect(exSpy).toHaveBeenCalled();
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
`Acquiring ${resolvedVersion} from ${expectedUrl}` `Acquiring ${resolvedVersion} - ${os.arch} from ${expectedUrl}`
); );
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
`Attempting to download ${versionSpec}...` `Attempting to download ${versionSpec}...`
@ -399,7 +399,7 @@ describe('setup-node', () => {
); );
expect(logSpy).toHaveBeenCalledWith("Resolved as '12.16.2'"); expect(logSpy).toHaveBeenCalledWith("Resolved as '12.16.2'");
expect(logSpy).toHaveBeenCalledWith( expect(logSpy).toHaveBeenCalledWith(
`Acquiring 12.16.2 from ${expectedUrl}` `Acquiring 12.16.2 - ${os.arch} from ${expectedUrl}`
); );
expect(logSpy).toHaveBeenCalledWith('Extracting ...'); expect(logSpy).toHaveBeenCalledWith('Extracting ...');
}); });

View file

@ -68,7 +68,9 @@ export async function getNode(
try { try {
info = await getInfoFromManifest(versionSpec, stable, auth, osArch); info = await getInfoFromManifest(versionSpec, stable, auth, osArch);
if (info) { if (info) {
core.info(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`); core.info(
`Acquiring ${info.resolvedVersion} - ${info.arch} from ${info.downloadUrl}`
);
downloadPath = await tc.downloadTool(info.downloadUrl, undefined, auth); downloadPath = await tc.downloadTool(info.downloadUrl, undefined, auth);
} else { } else {
core.info( core.info(
@ -102,7 +104,9 @@ export async function getNode(
); );
} }
core.info(`Acquiring ${info.resolvedVersion} from ${info.downloadUrl}`); core.info(
`Acquiring ${info.resolvedVersion} - ${info.arch} from ${info.downloadUrl}`
);
try { try {
downloadPath = await tc.downloadTool(info.downloadUrl); downloadPath = await tc.downloadTool(info.downloadUrl);
} catch (err) { } catch (err) {