fix: update dist file

This commit is contained in:
Ben Sterling 2022-07-20 13:25:28 +01:00
parent b6fd2d4ad9
commit b5845a9e76
No known key found for this signature in database
GPG Key ID: 4A6610DCFFC78977

13
dist/setup/index.js vendored
View File

@ -71448,11 +71448,16 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
// If not found in cache, download // If not found in cache, download
if (toolPath) { if (toolPath) {
core.info(`Found in cache @ ${toolPath}`); core.info(`Found in cache @ ${toolPath}`);
const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true }); if (osPlat != 'win32') {
if (!semver.satisfies(installedVersion, versionSpec)) { toolPath = path.join(toolPath, 'bin');
core.info(`Found ${installedVersion} in cache @ ${toolPath} but it does not satisfy the requested version (${versionSpec})`);
toolPath = '';
} }
core.addPath(toolPath);
const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true });
if (semver.satisfies(installedVersion, versionSpec)) {
return;
}
core.info(`Found ${installedVersion} in cache @ ${toolPath} but it does not satisfy the requested version (${versionSpec})`);
toolPath = '';
} }
if (!toolPath) { if (!toolPath) {
core.info(`Attempting to download ${versionSpec}...`); core.info(`Attempting to download ${versionSpec}...`);