Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions ng-dev/release/publish/external-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,23 +259,21 @@ export abstract class ExternalCommands {
}

/**
* Invokes the `yarn bazel run @npm2//:sync` command in order
* Invokes the `yarn bazel sync --only=repo` command in order
* to refresh Aspect lock files.
*/
static async invokeBazelUpdateAspectLockFiles(projectDir: string): Promise<void> {
const spinner = new Spinner('Updating Aspect lock files');

try {
await ChildProcess.spawn(getBazelBin(), ['run', '@npm2//:sync'], {
await ChildProcess.spawn(getBazelBin(), ['sync', '--only=repo'], {
cwd: projectDir,
mode: 'silent',
});
} catch (e) {
// Note: Gracefully handling these errors because `sync` command
// alway exits with a non-zero exit code.
Log.debug(e);
Log.error(e);
Log.error(' ✘ An error occurred while updating Aspect lock files.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure it exits gracefully?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I tried a couple of times and it always exited with a zero error code.

throw new FatalReleaseActionError();
}

spinner.success(green(' Updated Aspect `rules_js` lock files.'));
}
}
Loading