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

Function isInputFileDescriptor

lib/resolve/wait-stream.js:85–85  ·  view source on GitHub ↗
({fileDescriptors}, fdNumber)

Source from the content-addressed store, hash-verified

83// However, while `subprocess.std*` and transforms follow that direction, any stream passed the `std*` option has the opposite direction.
84// For example, `subprocess.stdin` is a writable, but the `stdin` option is a readable.
85export const isInputFileDescriptor = ({fileDescriptors}, fdNumber) => fdNumber !== 'all' && fileDescriptors[fdNumber].direction === 'input';
86
87// When `stream.destroy()` is called without an `error` argument, stream is aborted.
88// This is the only way to abort a readable stream, which can be useful in some instances.

Callers 2

waitForSubprocessStreamFunction · 0.90
shouldIgnoreStreamErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected