Skip to content

Commit

Permalink
make work with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu authored Aug 24, 2020
1 parent 50f73bd commit 973d40f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/makePatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
mkdirSync,
unlinkSync,
mkdirpSync,
realpathSync,
} from "fs-extra"
import { sync as rimraf } from "rimraf"
import { copySync } from "fs-extra"
Expand Down Expand Up @@ -181,7 +182,8 @@ export function makePatch({
// replace package with user's version
rimraf(tmpRepoPackagePath)

copySync(packagePath, tmpRepoPackagePath)
// pnpm installs packages as symlinks, copySync would copy only the symlink
copySync(realpathSync(packagePath), tmpRepoPackagePath)

// remove nested node_modules just to be safe
rimraf(join(tmpRepoPackagePath, "node_modules"))
Expand Down

0 comments on commit 973d40f

Please sign in to comment.