Fix pnpm native executable invocation (#2144)

This commit is contained in:
jinha-hwang-hajong 2026-05-28 22:43:57 +09:00 committed by GitHub
parent 831208b823
commit 94ad2284a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -655,6 +655,17 @@ describe("createPackageManagerInvocation", () => {
expect(invocation.windowsVerbatimArguments).toBeUndefined(); expect(invocation.windowsVerbatimArguments).toBeUndefined();
}); });
it("executes native npm_execpath directly instead of loading it through Node", () => {
setPlatform("linux");
const invocation = createPackageManagerInvocation(["--filter", "@open-design/desktop", "build"], {
npm_execpath: "/home/u/.local/share/pnpm/.tools/@pnpm+linux-x64/10.33.2/node_modules/@pnpm/linux-x64/pnpm",
} as NodeJS.ProcessEnv);
expect(invocation).toEqual({
args: ["--filter", "@open-design/desktop", "build"],
command: "/home/u/.local/share/pnpm/.tools/@pnpm+linux-x64/10.33.2/node_modules/@pnpm/linux-x64/pnpm",
});
});
it("uses binary npm_execpath directly on POSIX", () => { it("uses binary npm_execpath directly on POSIX", () => {
setPlatform("linux"); setPlatform("linux");
const invocation = createPackageManagerInvocation(["install"], { const invocation = createPackageManagerInvocation(["install"], {