mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +00:00
add check of exit code
This commit is contained in:
parent
360ab8b75b
commit
fe0d1625a2
3 changed files with 3 additions and 3 deletions
2
dist/cache-save/index.js
vendored
2
dist/cache-save/index.js
vendored
|
@ -4339,7 +4339,7 @@ exports.supportedPackageManagers = {
|
|||
};
|
||||
exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand);
|
||||
if (stderr) {
|
||||
if (exitCode && stderr) {
|
||||
throw new Error(stderr);
|
||||
}
|
||||
return stdout.trim();
|
||||
|
|
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -51887,7 +51887,7 @@ exports.supportedPackageManagers = {
|
|||
};
|
||||
exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand);
|
||||
if (stderr) {
|
||||
if (exitCode && stderr) {
|
||||
throw new Error(stderr);
|
||||
}
|
||||
return stdout.trim();
|
||||
|
|
|
@ -32,7 +32,7 @@ export const supportedPackageManagers: SupportedPackageManagers = {
|
|||
export const getCommandOutput = async (toolCommand: string) => {
|
||||
const {stdout, stderr, exitCode} = await exec.getExecOutput(toolCommand);
|
||||
|
||||
if (stderr) {
|
||||
if (exitCode && stderr) {
|
||||
throw new Error(stderr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue