MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / handleArguments

Function handleArguments

out/cli.cjs:66833–66860  ·  view source on GitHub ↗
(file, args, options = {})

Source from the content-addressed store, hash-verified

66831var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
66832var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
66833 const env2 = extendEnv ? { ...import_node_process7.default.env, ...envOption } : envOption;
66834 if (preferLocal) {
66835 return npmRunPathEnv({ env: env2, cwd: localDir, execPath });
66836 }
66837 return env2;
66838};
66839var handleArguments = (file, args, options = {}) => {
66840 const parsed = import_cross_spawn.default._parse(file, args, options);
66841 file = parsed.command;
66842 args = parsed.args;
66843 options = parsed.options;
66844 options = {
66845 maxBuffer: DEFAULT_MAX_BUFFER,
66846 buffer: true,
66847 stripFinalNewline: true,
66848 extendEnv: true,
66849 preferLocal: false,
66850 localDir: options.cwd || import_node_process7.default.cwd(),
66851 execPath: import_node_process7.default.execPath,
66852 encoding: "utf8",
66853 reject: true,
66854 cleanup: true,
66855 all: false,
66856 windowsHide: true,
66857 verbose: verboseDefault,
66858 ...options
66859 };
66860 options.env = getEnv(options);
66861 options.stdio = normalizeStdio(options);
66862 if (import_node_process7.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") {
66863 args.unshift("/q");

Callers 2

execaFunction · 0.85
execaSyncFunction · 0.85

Calls 3

getEnvFunction · 0.85
normalizeStdioFunction · 0.85
_parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…