MCPcopy Index your code
hub / github.com/nodejs/node / checkExecSyncError

Function checkExecSyncError

lib/child_process.js:916–929  ·  view source on GitHub ↗
(ret, args, cmd)

Source from the content-addressed store, hash-verified

914
915
916function checkExecSyncError(ret, args, cmd) {
917 let err;
918 if (ret.error) {
919 err = ret.error;
920 ObjectAssign(err, ret);
921 } else if (ret.status !== 0) {
922 let msg = 'Command failed: ';
923 msg += cmd || ArrayPrototypeJoin(args, ' ');
924 if (ret.stderr && ret.stderr.length > 0)
925 msg += `\n${ret.stderr.toString()}`;
926 err = genericNodeError(msg, ret);
927 }
928 return err;
929}
930
931/**
932 * Spawns a file as a shell synchronously.

Callers 2

execFileSyncFunction · 0.85
execSyncFunction · 0.85

Calls 2

ObjectAssignFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…