MCPcopy Create free account
hub / github.com/vercel/vercel / runShellScript

Function runShellScript

packages/build-utils/src/fs/run-user-scripts.ts:285–300  ·  view source on GitHub ↗
(
  fsPath: string,
  args: string[] = [],
  spawnOpts?: SpawnOptions
)

Source from the content-addressed store, hash-verified

283}
284
285export async function runShellScript(
286 fsPath: string,
287 args: string[] = [],
288 spawnOpts?: SpawnOptions
289) {
290 assert(path.isAbsolute(fsPath));
291 const destPath = path.dirname(fsPath);
292 await chmodPlusX(fsPath);
293 const command = `./${path.basename(fsPath)}`;
294 await spawnAsync(command, args, {
295 ...spawnOpts,
296 cwd: destPath,
297 prettyCommand: command,
298 });
299 return true;
300}
301
302/**
303 * @deprecated Don't use this function directly.

Callers 2

runUserScriptsFunction · 0.90
buildFunction · 0.90

Calls 3

assertFunction · 0.85
chmodPlusXFunction · 0.85
spawnAsyncFunction · 0.70

Tested by

no test coverage detected