mirror of
https://github.com/actions/setup-node.git
synced 2025-12-15 01:01:38 +08:00
add check of exit code
This commit is contained in:
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();
|
||||
|
||||
Reference in New Issue
Block a user