Skip to content

Commit 3c0883a

Browse files
authored
Merge pull request #252 from milahu/patch-1
make work with pnpm
2 parents bb9009d + 973d40f commit 3c0883a

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"
@@ -189,7 +190,8 @@ export function makePatch({
189190
// replace package with user's version
190191
rimraf(tmpRepoPackagePath)
191192

192-
copySync(packagePath, tmpRepoPackagePath)
193+
// pnpm installs packages as symlinks, copySync would copy only the symlink
194+
copySync(realpathSync(packagePath), tmpRepoPackagePath)
193195

194196
// remove nested node_modules just to be safe
195197
rimraf(join(tmpRepoPackagePath, "node_modules"))

0 commit comments

Comments
 (0)