From 973d40fc2186683cac138413b8bdede775a485fa Mon Sep 17 00:00:00 2001 From: milahu Date: Mon, 24 Aug 2020 10:03:20 +0200 Subject: [PATCH] make work with pnpm --- src/makePatch.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/makePatch.ts b/src/makePatch.ts index 8ebeab17..afdfd430 100644 --- a/src/makePatch.ts +++ b/src/makePatch.ts @@ -9,6 +9,7 @@ import { mkdirSync, unlinkSync, mkdirpSync, + realpathSync, } from "fs-extra" import { sync as rimraf } from "rimraf" import { copySync } from "fs-extra" @@ -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"))