MCPcopy
hub / github.com/shelljs/shx / run

Function run

src/cli.js:10–17  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

8// `input` is null if we're running from a TTY, or a string of all stdin if
9// running from the right-hand side of a pipe
10const run = (input) => {
11 // Pass stdin to shx as the 'this' parameter
12 process.exitCode = shx.call(input, process.argv);
13
14 // We use process.exitCode to ensure we don't terminate the process before
15 // streams finish. See:
16 // https://github.com/shelljs/shx/issues/85
17};
18
19// ShellJS doesn't support input streams, so we have to collect all input first
20if (shouldReadStdin(parsedArgs._)) {

Callers 1

cli.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected