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

Function exec

packages/cli/test/dev/utils.ts:313–331  ·  view source on GitHub ↗
(directory: string, args: string[] = [])

Source from the content-addressed store, hash-verified

311}
312
313export async function exec(directory: string, args: string[] = []) {
314 const token = await fetchCachedToken();
315
316 console.log(
317 `exec() ${binaryPath} dev ${directory} -t ***${
318 process.env.VERCEL_TEAM_ID ? ' --scope ***' : ''
319 } ${args.join(' ')}`
320 );
321
322 const scope: string[] = process.env.VERCEL_TEAM_ID
323 ? ['--scope', process.env.VERCEL_TEAM_ID]
324 : [];
325
326 return execa(binaryPath, ['dev', directory, '-t', token, ...scope, ...args], {
327 reject: false,
328 shell: true,
329 env: { __VERCEL_SKIP_DEV_CMD: '1' },
330 });
331}
332
333async function runNpmInstall(fixturePath: string) {
334 if (await fs.pathExists(join(fixturePath, 'package.json'))) {

Callers 12

loaderFunction · 0.50
index.jsFile · 0.50
isDirtyFunction · 0.50
index.jsFile · 0.50
build.jsFile · 0.50
index.jsFile · 0.50
runcodeMethod · 0.50
_get_func_codeMethod · 0.50
_cov_wrapper.pyFile · 0.50
lambda_invoke.pyFile · 0.50

Calls 4

fetchCachedTokenFunction · 0.90
execaFunction · 0.85
logMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected