Lines Matching refs:args

104  * @param {string[]} [args]
123 function fork(modulePath, args = [], options) {
126 // Get options and args arguments.
129 if (args == null) {
130 args = [];
131 } else if (typeof args === 'object' && !ArrayIsArray(args)) {
132 options = args;
133 args = [];
135 validateArray(args, 'args');
158 args = [...execArgv, modulePath, ...args];
172 return spawn(options.execPath, args, options);
240 return (...args) => {
243 promise.child = orig(...args, (err, stdout, stderr) => {
263 function normalizeExecFileArgs(file, args, options, callback) {
264 if (ArrayIsArray(args)) {
265 args = ArrayPrototypeSlice(args);
266 } else if (args != null && typeof args === 'object') {
268 options = args;
269 args = null;
270 } else if (typeof args === 'function') {
271 callback = args;
273 args = null;
276 if (args == null) {
277 args = [];
300 return { file, args, options, callback };
306 * @param {string[]} [args]
328 function execFile(file, args, options, callback) {
329 ({ file, args, options, callback } = normalizeExecFileArgs(file, args, options, callback));
351 const child = spawn(file, args, {
418 if (args?.length)
419 cmd += ` ${ArrayPrototypeJoin(args, ' ')}`;
483 (buf, ...args) => buf.slice(...args);
547 function normalizeSpawnArguments(file, args, options) {
554 if (ArrayIsArray(args)) {
555 args = ArrayPrototypeSlice(args);
556 } else if (args == null) {
557 args = [];
558 } else if (typeof args !== 'object') {
559 throw new ERR_INVALID_ARG_TYPE('args', 'object', args);
561 options = args;
562 args = [];
565 validateArgumentsNullCheck(args, 'args');
622 const command = ArrayPrototypeJoin([file, ...args], ' ');
631 args = ['/d', '/s', '/c', `"${command}"`];
634 args = ['-c', command];
643 args = ['-c', command];
648 ArrayPrototypeUnshift(args, options.argv0);
650 ArrayPrototypeUnshift(args, file);
709 args,
734 * @param {string[]} [args]
753 function spawn(file, args, options) {
754 options = normalizeSpawnArguments(file, args, options);
804 * @param {string[]} [args]
831 function spawnSync(file, args, options) {
835 ...normalizeSpawnArguments(file, args, options),
880 function checkExecSyncError(ret, args, cmd) {
887 msg += cmd || ArrayPrototypeJoin(args, ' ');
898 * @param {string[]} [args]
915 function execFileSync(file, args, options) {
916 ({ file, args, options } = normalizeExecFileArgs(file, args, options));
919 const ret = spawnSync(file, args, options);
925 ArrayPrototypePushApply(errArgs, args);
978 function validateArgumentsNullCheck(args, propName) {
979 for (let i = 0; i < args.length; ++i) {
980 validateArgumentNullCheck(args[i], `${propName}[${i}]`);