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

Function concatenateShell

lib/arguments/shell.js:9–11  ·  view source on GitHub ↗
(file, commandArguments, options)

Source from the content-addressed store, hash-verified

7// For example, this allows us to easily detect which arguments are passed.
8// So we do want users to pass array of arguments even with `shell: true`, but we also want to avoid any warning.
9export const concatenateShell = (file, commandArguments, options) => options.shell && commandArguments.length > 0
10 ? [[file, ...commandArguments].join(' '), [], options]
11 : [file, commandArguments, options];

Callers 2

runSubprocessSyncFunction · 0.90
spawnSubprocessAsyncFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected