MCPcopy Create free account
hub / github.com/sindresorhus/execa / waitForSubprocess

Function waitForSubprocess

lib/convert/shared.js:33–38  ·  view source on GitHub ↗
(subprocess, error)

Source from the content-addressed store, hash-verified

31
32// When `readable` or `writable` aborts/errors, awaits the subprocess, for the reason mentioned above
33export const waitForSubprocess = async (subprocess, error) => {
34 await subprocess;
35 if (error) {
36 throw error;
37 }
38};
39
40export const destroyOtherStream = (stream, isOpen, error) => {
41 if (error && !isStreamAbort(error)) {

Callers 2

onWritableDestroyFunction · 0.90
onReadableDestroyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected