MCPcopy Create free account
hub / github.com/Snapchat/Valdi / spawnCommand

Method spawnCommand

npm_modules/cli/src/utils/BazelClient.ts:277–287  ·  view source on GitHub ↗
(
    command: string,
    stdioMode: StdioOptions = DEFAULT_STDIO_MODE,
    extraArgs: string = '',
  )

Source from the content-addressed store, hash-verified

275 }
276
277 private async spawnCommand(
278 command: string,
279 stdioMode: StdioOptions = DEFAULT_STDIO_MODE,
280 extraArgs: string = '',
281 ): Promise<CommandResult> {
282 const commandWithOptions = getBazelCommandString(command, extraArgs, false);
283 console.log(
284 `${wrapInColor('Running Bazel command:', ANSI_COLORS.YELLOW_COLOR)} ${getBazelCli()} ${command} ${extraArgs}`,
285 );
286 return await spawnCliCommand(commandWithOptions, undefined, stdioMode, true, true);
287 }
288
289 private async resolveTarget(pathStr: string): Promise<string> {
290 const absolutePath = path.resolve(pathStr);

Callers 7

queryTargetsForKindsMethod · 0.95
queryTargetsForTagMethod · 0.95
buildTargetMethod · 0.95
buildTargetsMethod · 0.95
runTargetMethod · 0.95
testTargetsMethod · 0.95

Calls 5

wrapInColorFunction · 0.90
spawnCliCommandFunction · 0.90
getBazelCommandStringFunction · 0.85
getBazelCliFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected