Skip to content

Commit 022108f

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

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,21 @@ 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 {
267269
// Note: No progress indicator needed as that is the responsibility of the command.
268270
// TODO: Consider using an Ora spinner instead to ensure minimal console output.
269-
await ChildProcess.spawn(getBazelBin(), ['run', '@npm2//:sync'], {cwd: projectDir});
271+
await ChildProcess.spawn(getBazelBin(), ['run', '@npm2//:sync'], {
272+
cwd: projectDir,
273+
mode: 'silent',
274+
});
270275
} catch (e) {
271276
// Note: Gracefully handling these errors because `sync` command
272277
// alway exits with a non-zero exit code.
278+
Log.debug(e);
273279
}
274280

275-
Log.info(green(' Updated Aspect `rules_js` lock files.'));
281+
spinner.success(green(' Updated Aspect `rules_js` lock files.'));
276282
}
277283
}

0 commit comments

Comments
 (0)