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

Function normalizeExecArgs

lib/child_process.js:191–209  ·  view source on GitHub ↗
(command, options, callback)

Source from the content-addressed store, hash-verified

189}
190
191function normalizeExecArgs(command, options, callback) {
192 validateString(command, 'command');
193 validateArgumentNullCheck(command, 'command');
194
195 if (typeof options === 'function') {
196 callback = options;
197 options = undefined;
198 }
199
200 // Make a shallow copy so we don't clobber the user's options object.
201 options = { __proto__: null, ...options };
202 options.shell = typeof options.shell === 'string' ? options.shell : true;
203
204 return {
205 file: command,
206 options: options,
207 callback: callback,
208 };
209}
210
211/**
212 * Spawns a shell executing the given command.

Callers 2

execFunction · 0.85
execSyncFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…