From 3305bba8d91d1a24e8b98ff0665c20c18c6024d5 Mon Sep 17 00:00:00 2001 From: Juanra GM Date: Sun, 9 Oct 2022 12:58:00 +0200 Subject: [PATCH] fix: return correct path Closes #5471 --- .changeset/thick-dancers-guess.md | 5 +++++ packages/plugin-commands-publishing/src/pack.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/thick-dancers-guess.md diff --git a/.changeset/thick-dancers-guess.md b/.changeset/thick-dancers-guess.md new file mode 100644 index 00000000000..7f8910f975b --- /dev/null +++ b/.changeset/thick-dancers-guess.md @@ -0,0 +1,5 @@ +--- +"@pnpm/plugin-commands-publishing": patch +--- + +Fix the return path of `pnpm pack` (#5471) diff --git a/packages/plugin-commands-publishing/src/pack.ts b/packages/plugin-commands-publishing/src/pack.ts index ed894d299c4..141080506e0 100644 --- a/packages/plugin-commands-publishing/src/pack.ts +++ b/packages/plugin-commands-publishing/src/pack.ts @@ -116,7 +116,7 @@ export async function handler ( await _runScriptsIfPresent(['postpack'], entryManifest) } if (opts.dir !== dir) { - return path.join(dir, tarballName) + return path.join(destDir, tarballName) } return path.relative(opts.dir, path.join(dir, tarballName)) }