Skip to content

Commit 973d40f

Browse files
authored
make work with pnpm
1 parent 50f73bd commit 973d40f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/makePatch.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
mkdirSync,
1010
unlinkSync,
1111
mkdirpSync,
12+
realpathSync,
1213
} from "fs-extra"
1314
import { sync as rimraf } from "rimraf"
1415
import { copySync } from "fs-extra"
@@ -181,7 +182,8 @@ export function makePatch({
181182
// replace package with user's version
182183
rimraf(tmpRepoPackagePath)
183184

184-
copySync(packagePath, tmpRepoPackagePath)
185+
// pnpm installs packages as symlinks, copySync would copy only the symlink
186+
copySync(realpathSync(packagePath), tmpRepoPackagePath)
185187

186188
// remove nested node_modules just to be safe
187189
rimraf(join(tmpRepoPackagePath, "node_modules"))

0 commit comments

Comments
 (0)