Skip to content

Commit 25bd3c1

Browse files
committed
Use safeRemove instead of fs.unlink for .npmignore removal
1 parent 9e69263 commit 25bd3c1

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

scripts/install-npm-packages.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,11 +691,9 @@ async function installPackage(packageInfo) {
691691

692692
// Remove .npmignore if it exists, as it can also filter out test files.
693693
const npmignorePath = path.join(extractedPath, '.npmignore')
694-
try {
695-
await fs.unlink(npmignorePath)
696-
} catch {
694+
await safeRemove(npmignorePath).catch(() => {
697695
// File doesn't exist, ignore.
698-
}
696+
})
699697

700698
// Create a new tarball with all files included (no files field filtering).
701699
// This ensures test files are preserved when pnpm installs the package.

0 commit comments

Comments
 (0)