MCPcopy
hub / github.com/vercel/next.js / command

Function command

turbopack/packages/devlow-bench/src/shell.ts:185–204  ·  turbopack/packages/devlow-bench/src/shell.ts::command
(
  command: string,
  args: string[],
  options: {
    env?: Record<string, string>
    cwd?: string
  } = {}
)

Source from the content-addressed store, hash-verified

183}
184
185export function command(
186 command: string,
187 args: string[],
188 options: {
189 env?: Record<string, string>
190 cwd?: string
191 } = {}
192): Command {
193 const process = spawn(command, args, {
194 shell: true,
195 ...options,
196 stdio: [class="st">'ignore', class="st">'pipe', class="st">'pipe'],
197 })
198 if (shellOutput) {
199 console.log(
200 `[SHELL] ${command} ${args.join(class="st">' ')} ${JSON.stringify(options)}`
201 )
202 }
203 return new CommandImpl(process)
204}

Callers 5

devlow-bench.mjsFile · 0.90
nextBuildWorkflowFunction · 0.90
nextDevWorkflowFunction · 0.90
shell-test.tsFile · 0.50
constants.tsFile · 0.50

Calls 4

spawnFunction · 0.50
logMethod · 0.45
joinMethod · 0.45
stringifyMethod · 0.45

Tested by

no test coverage detected