MCPcopy
hub / github.com/angular/angular / runBazelCommandOnTargets

Function runBazelCommandOnTargets

goldens/public-api/manage.js:50–65  ·  view source on GitHub ↗

* Run the provided bazel commands on each provided target individually.

(command, targets, present)

Source from the content-addressed store, hash-verified

48 * Run the provided bazel commands on each provided target individually.
49 */
50function runBazelCommandOnTargets(command, targets, present) {
51 for (const target of targets) {
52 process.stdout.write(`${present}: ${target}`);
53 const commandResult = spawnSync('pnpm', ['--silent', 'bazel', command, target]);
54 process.stdout.clearLine();
55 process.stdout.cursorTo(0);
56 if (commandResult.status) {
57 console.error(`Failed ${command}: ${target}`);
58 console.group();
59 console.error(commandResult.stdout || commandResult.stderr);
60 console.groupEnd();
61 } else {
62 console.log(`Successful ${command}: ${target}`);
63 }
64 }
65}
66
67switch (USER_COMMAND) {
68 case 'accept':

Callers 1

manage.jsFile · 0.70

Calls 4

writeMethod · 0.65
errorMethod · 0.65
logMethod · 0.65
groupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…