File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed
Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -350,27 +350,25 @@ export async function pnpmFix(
350350 errored = true
351351 }
352352
353- if ( errored || isCi ) {
353+ if ( errored ) {
354354 editablePkgJson . update ( revertData )
355-
355+ // eslint-disable-next-line no-await-in-loop
356+ await Promise . all ( [ removeNodeModules ( cwd ) , editablePkgJson . save ( ) ] )
357+ // eslint-disable-next-line no-await-in-loop
358+ actualTree = await install ( pkgEnvDetails , { spinner } )
359+ spinner ?. failAndStop (
360+ `Update failed for ${ oldSpec } in ${ workspaceName } ` ,
361+ error
362+ )
363+ } else if ( isCi ) {
356364 // eslint-disable-next-line no-await-in-loop
357365 await Promise . all ( [
358366 removeNodeModules ( cwd ) ,
359- ...( isCi
360- ? [ gitCheckoutBaseBranchIfAvailable ( baseBranch , cwd ) ]
361- : [ ] ) ,
362- ...( isCi ? [ ] : [ editablePkgJson . save ( ) ] )
367+ // Reset to base branch to isolate next PR
368+ gitCheckoutBaseBranchIfAvailable ( baseBranch , cwd )
363369 ] )
364-
365370 // eslint-disable-next-line no-await-in-loop
366371 actualTree = await install ( pkgEnvDetails , { spinner } )
367-
368- if ( errored ) {
369- spinner ?. failAndStop (
370- `Update failed for ${ oldSpec } in ${ workspaceName } ` ,
371- error
372- )
373- }
374372 }
375373 }
376374 }
You can’t perform that action at this time.
0 commit comments