Skip to content

Commit 6c8b114

Browse files
committed
fix(ng-dev): improve logging output for updating aspect files (#2536)
Improve logging and use spinner instead of just outputting the bazel outputs. PR Close #2536
1 parent 32c0b11 commit 6c8b114

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

ng-dev/release/publish/external-commands.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,19 @@ export abstract class ExternalCommands {
263263
* to refresh Aspect lock files.
264264
*/
265265
static async invokeBazelUpdateAspectLockFiles(projectDir: string): Promise<void> {
266+
const spinner = new Spinner('Updating Aspect lock files');
267+
266268
try {
267-
// Note: No progress indicator needed as that is the responsibility of the command.
268-
// TODO: Consider using an Ora spinner instead to ensure minimal console output.
269-
await ChildProcess.spawn(getBazelBin(), ['run', '@npm2//:sync'], {cwd: projectDir});
269+
await ChildProcess.spawn(getBazelBin(), ['run', '@npm2//:sync'], {
270+
cwd: projectDir,
271+
mode: 'silent',
272+
});
270273
} catch (e) {
271274
// Note: Gracefully handling these errors because `sync` command
272275
// alway exits with a non-zero exit code.
276+
Log.debug(e);
273277
}
274278

275-
Log.info(green(' Updated Aspect `rules_js` lock files.'));
279+
spinner.success(green(' Updated Aspect `rules_js` lock files.'));
276280
}
277281
}

0 commit comments

Comments
 (0)