mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
Merge 33f99b1a18 into 53fb175855
This commit is contained in:
commit
869274d26c
2 changed files with 6 additions and 6 deletions
|
|
@ -641,9 +641,9 @@ export function createPackageManagerInvocation(args: string[], env: NodeJS.Proce
|
|||
return createCommandInvocation({ args, command: execPath, env });
|
||||
}
|
||||
if (process.platform === "win32") {
|
||||
return buildCmdShimInvocation("pnpm", args, env);
|
||||
return buildCmdShimInvocation("corepack", ["pnpm", ...args], env);
|
||||
}
|
||||
return { args, command: "pnpm" };
|
||||
return { args: ["pnpm", ...args], command: "corepack" };
|
||||
}
|
||||
|
||||
function createLoggedStdio(logFd?: number | null): StdioOptions {
|
||||
|
|
|
|||
|
|
@ -693,13 +693,13 @@ describe("createPackageManagerInvocation", () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it("returns plain pnpm invocation on POSIX without npm_execpath", () => {
|
||||
it("returns corepack pnpm invocation on POSIX without npm_execpath", () => {
|
||||
setPlatform("linux");
|
||||
const invocation = createPackageManagerInvocation(["install"], {} as NodeJS.ProcessEnv);
|
||||
expect(invocation).toEqual({ args: ["install"], command: "pnpm" });
|
||||
expect(invocation).toEqual({ args: ["pnpm", "install"], command: "corepack" });
|
||||
});
|
||||
|
||||
it("wraps pnpm through cmd.exe with verbatim arguments on Windows", () => {
|
||||
it("wraps corepack pnpm through cmd.exe with verbatim arguments on Windows", () => {
|
||||
setPlatform("win32");
|
||||
const invocation = createPackageManagerInvocation(["--filter", "@open-design/desktop", "build"], {
|
||||
ComSpec: "cmd.exe",
|
||||
|
|
@ -710,7 +710,7 @@ describe("createPackageManagerInvocation", () => {
|
|||
"/d",
|
||||
"/s",
|
||||
"/c",
|
||||
'"pnpm --filter @open-design/desktop build"',
|
||||
'"corepack pnpm --filter @open-design/desktop build"',
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue