mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 17:26:27 +00:00
Merge remote-tracking branch 'original/main' into fix/corrupted-cache
This commit is contained in:
commit
b6fd2d4ad9
4 changed files with 23 additions and 14 deletions
4
dist/cache-save/index.js
vendored
4
dist/cache-save/index.js
vendored
|
@ -59931,7 +59931,7 @@ exports.supportedPackageManagers = {
|
||||||
},
|
},
|
||||||
pnpm: {
|
pnpm: {
|
||||||
lockFilePatterns: ['pnpm-lock.yaml'],
|
lockFilePatterns: ['pnpm-lock.yaml'],
|
||||||
getCacheFolderCommand: 'pnpm store path'
|
getCacheFolderCommand: 'pnpm store path --silent'
|
||||||
},
|
},
|
||||||
yarn1: {
|
yarn1: {
|
||||||
lockFilePatterns: ['yarn.lock'],
|
lockFilePatterns: ['yarn.lock'],
|
||||||
|
@ -59986,7 +59986,7 @@ exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaite
|
||||||
throw new Error(`Could not get cache folder path for ${packageManager}`);
|
throw new Error(`Could not get cache folder path for ${packageManager}`);
|
||||||
}
|
}
|
||||||
core.debug(`${packageManager} path is ${stdOut}`);
|
core.debug(`${packageManager} path is ${stdOut}`);
|
||||||
return stdOut;
|
return stdOut.trim();
|
||||||
});
|
});
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||||
|
|
13
dist/setup/index.js
vendored
13
dist/setup/index.js
vendored
|
@ -71277,7 +71277,7 @@ exports.supportedPackageManagers = {
|
||||||
},
|
},
|
||||||
pnpm: {
|
pnpm: {
|
||||||
lockFilePatterns: ['pnpm-lock.yaml'],
|
lockFilePatterns: ['pnpm-lock.yaml'],
|
||||||
getCacheFolderCommand: 'pnpm store path'
|
getCacheFolderCommand: 'pnpm store path --silent'
|
||||||
},
|
},
|
||||||
yarn1: {
|
yarn1: {
|
||||||
lockFilePatterns: ['yarn.lock'],
|
lockFilePatterns: ['yarn.lock'],
|
||||||
|
@ -71332,7 +71332,7 @@ exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaite
|
||||||
throw new Error(`Could not get cache folder path for ${packageManager}`);
|
throw new Error(`Could not get cache folder path for ${packageManager}`);
|
||||||
}
|
}
|
||||||
core.debug(`${packageManager} path is ${stdOut}`);
|
core.debug(`${packageManager} path is ${stdOut}`);
|
||||||
return stdOut;
|
return stdOut.trim();
|
||||||
});
|
});
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||||
|
@ -71852,8 +71852,13 @@ function run() {
|
||||||
yield installer.getNode(version, stable, checkLatest, auth, arch);
|
yield installer.getNode(version, stable, checkLatest, auth, arch);
|
||||||
}
|
}
|
||||||
// Output version of node is being used
|
// Output version of node is being used
|
||||||
const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true });
|
try {
|
||||||
core.setOutput('node-version', installedVersion);
|
const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true, silent: true });
|
||||||
|
core.setOutput('node-version', installedVersion.trim());
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
core.setOutput('node-version', '');
|
||||||
|
}
|
||||||
const registryUrl = core.getInput('registry-url');
|
const registryUrl = core.getInput('registry-url');
|
||||||
const alwaysAuth = core.getInput('always-auth');
|
const alwaysAuth = core.getInput('always-auth');
|
||||||
if (registryUrl) {
|
if (registryUrl) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const supportedPackageManagers: SupportedPackageManagers = {
|
||||||
},
|
},
|
||||||
pnpm: {
|
pnpm: {
|
||||||
lockFilePatterns: ['pnpm-lock.yaml'],
|
lockFilePatterns: ['pnpm-lock.yaml'],
|
||||||
getCacheFolderCommand: 'pnpm store path'
|
getCacheFolderCommand: 'pnpm store path --silent'
|
||||||
},
|
},
|
||||||
yarn1: {
|
yarn1: {
|
||||||
lockFilePatterns: ['yarn.lock'],
|
lockFilePatterns: ['yarn.lock'],
|
||||||
|
@ -94,7 +94,7 @@ export const getCacheDirectoryPath = async (
|
||||||
|
|
||||||
core.debug(`${packageManager} path is ${stdOut}`);
|
core.debug(`${packageManager} path is ${stdOut}`);
|
||||||
|
|
||||||
return stdOut;
|
return stdOut.trim();
|
||||||
};
|
};
|
||||||
|
|
||||||
export function isGhes(): boolean {
|
export function isGhes(): boolean {
|
||||||
|
|
|
@ -41,12 +41,16 @@ export async function run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output version of node is being used
|
// Output version of node is being used
|
||||||
|
try {
|
||||||
const {stdout: installedVersion} = await exec.getExecOutput(
|
const {stdout: installedVersion} = await exec.getExecOutput(
|
||||||
'node',
|
'node',
|
||||||
['--version'],
|
['--version'],
|
||||||
{ignoreReturnCode: true}
|
{ignoreReturnCode: true, silent: true}
|
||||||
);
|
);
|
||||||
core.setOutput('node-version', installedVersion);
|
core.setOutput('node-version', installedVersion.trim());
|
||||||
|
} catch (err) {
|
||||||
|
core.setOutput('node-version', '');
|
||||||
|
}
|
||||||
|
|
||||||
const registryUrl: string = core.getInput('registry-url');
|
const registryUrl: string = core.getInput('registry-url');
|
||||||
const alwaysAuth: string = core.getInput('always-auth');
|
const alwaysAuth: string = core.getInput('always-auth');
|
||||||
|
|
Loading…
Add table
Reference in a new issue