@@ -19,6 +19,7 @@ import {ReleaseInfoJsonStdout} from '../info/cli.js';
1919import { ReleasePrecheckJsonStdin } from '../precheck/cli.js' ;
2020import { BuiltPackageWithInfo } from '../config/index.js' ;
2121import { green , Log } from '../../utils/logging.js' ;
22+ import { getBazelBin } from '../../utils/bazel-bin.js' ;
2223
2324/*
2425 * ###############################################################
@@ -262,19 +263,10 @@ export abstract class ExternalCommands {
262263 * to refresh Aspect lock files.
263264 */
264265 static async invokeBazelUpdateAspectLockFiles ( projectDir : string ) : Promise < void > {
265- // Note: We cannot use `yarn` directly as command because we might operate in
266- // a different publish branch and the current `PATH` will point to the Yarn version
267- // that invoked the release tool. More details in the function description.
268- const yarnCommand = await resolveYarnScriptForProject ( projectDir ) ;
269-
270266 try {
271267 // Note: No progress indicator needed as that is the responsibility of the command.
272268 // TODO: Consider using an Ora spinner instead to ensure minimal console output.
273- await ChildProcess . spawn (
274- yarnCommand . binary ,
275- [ ...yarnCommand . args , 'bazelisk' , 'run' , '@npm2//:sync' ] ,
276- { cwd : projectDir } ,
277- ) ;
269+ await ChildProcess . spawn ( getBazelBin ( ) , [ 'run' , '@npm2//:sync' ] , { cwd : projectDir } ) ;
278270 } catch ( e ) {
279271 // Note: Gracefully handling these errors because `sync` command
280272 // alway exits with a non-zero exit code.
0 commit comments