File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -366,10 +366,6 @@ export abstract class ReleaseAction {
366366 protected async checkoutUpstreamBranch ( branchName : string ) {
367367 this . git . run ( [ 'fetch' , '-q' , this . git . getRepoGitUrl ( ) , branchName ] ) ;
368368 this . git . run ( [ 'checkout' , '-q' , 'FETCH_HEAD' , '--detach' ] ) ;
369- try {
370- // Remove node_modules even if they are ignored. (We do not want to run -dxf to avoid deleting other files suchs as .ng-dev-lock)
371- this . git . run ( [ 'clean' , '-qdfX **/node_modules' ] ) ;
372- } catch { }
373369 }
374370
375371 /** Installs all Yarn dependencies in the current branch. */
@@ -386,7 +382,9 @@ export abstract class ReleaseAction {
386382 // This is a workaround for: https://github.com/yarnpkg/yarn/issues/8146. Even though
387383 // we might be able to fix this with Yarn 2+, it is reasonable ensuring clean node modules.
388384 // TODO: Remove this when we use Yarn 2+ in all Angular repositories.
389- await fs . rm ( nodeModulesDir , { force : true , recursive : true , maxRetries : 3 } ) ;
385+ try {
386+ this . git . run ( [ 'clean' , '-qdfX' , '**/node_modules' ] ) ;
387+ } catch { }
390388 await ExternalCommands . invokeYarnInstall ( this . projectDir ) ;
391389 }
392390
You can’t perform that action at this time.
0 commit comments