Skip to content

Commit e5ff60c

Browse files
authored
Clear node_modules just in case for pnpm local runs of fix (#618)
1 parent d5f2fb2 commit e5ff60c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/commands/fix/pnpm-fix.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ export async function pnpmFix(
315315

316316
// actualTree may not be defined on the first iteration of pkgJsonPathsLoop.
317317
if (!actualTree) {
318+
if (!isCi) {
319+
// eslint-disable-next-line no-await-in-loop
320+
await removeNodeModules(cwd)
321+
}
318322
const maybeActualTree =
319323
isCi && existsSync(path.join(rootPath, 'node_modules'))
320324
? // eslint-disable-next-line no-await-in-loop

0 commit comments

Comments
 (0)