(directory: string, args: string[] = [])
| 311 | } |
| 312 | |
| 313 | export 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 | |
| 333 | async function runNpmInstall(fixturePath: string) { |
| 334 | if (await fs.pathExists(join(fixturePath, 'package.json'))) { |
no test coverage detected