Skip to content

Commit

Permalink
Merge pull request #252 from milahu/patch-1
Browse files Browse the repository at this point in the history
make work with pnpm
  • Loading branch information
ds300 authored Mar 2, 2021
2 parents bb9009d + 973d40f commit 3c0883a
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 @@ -189,7 +190,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 3c0883a

Please sign in to comment.