Skip to content

Commit e82c2ad

Browse files
committed
fix: conditionally generate pnpm shim based on OS platform and bump version to 1.0.0-beta.34
1 parent 7f49f65 commit e82c2ad

5 files changed

Lines changed: 28 additions & 14 deletions

File tree

.changeset/brave-weeks-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pipelab/plugin-electron": patch
3+
---
4+
5+
fix shim

.changeset/pre.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"mini-c3-electron": "0.0.0"
3434
},
3535
"changesets": [
36+
"brave-weeks-relax",
3637
"brown-nights-stop",
3738
"bumpy-falcons-obey",
3839
"busy-trains-guess",

plugins/plugin-electron/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @pipelab/plugin-electron
22

3+
## 1.0.0-beta.34
4+
5+
### Patch Changes
6+
7+
- fix shim
8+
39
## 1.0.0-beta.33
410

511
### Patch Changes

plugins/plugin-electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipelab/plugin-electron",
3-
"version": "1.0.0-beta.33",
3+
"version": "1.0.0-beta.34",
44
"description": "Pipelab plugin for packaging apps with Electron",
55
"keywords": [
66
"automation",

plugins/plugin-electron/src/forge.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -575,19 +575,21 @@ export const forge = async (
575575

576576
const pnpmCjsPath = paths.pnpm;
577577

578-
// Write pnpm.cmd for Windows support
579-
await writeFile(
580-
join(shimDir, "pnpm.cmd"),
581-
`@echo off\r\n"${node}" "${pnpmCjsPath}" %*\r\n`,
582-
"utf8",
583-
);
584-
585-
// Write pnpm shell script for Unix/Linux/macOS support
586-
await writeFile(
587-
join(shimDir, "pnpm"),
588-
`#!/bin/sh\nexec "${node}" "${pnpmCjsPath}" "$@"\n`,
589-
{ encoding: "utf8", mode: 0o755 },
590-
);
578+
if (osPlatform() === "win32") {
579+
// Write pnpm.cmd for Windows support
580+
await writeFile(
581+
join(shimDir, "pnpm.cmd"),
582+
`@echo off\r\n"${node}" "${pnpmCjsPath}" %*\r\n`,
583+
"utf8",
584+
);
585+
} else {
586+
// Write pnpm shell script for Unix/Linux/macOS support
587+
await writeFile(
588+
join(shimDir, "pnpm"),
589+
`#!/bin/sh\nexec "${node}" "${pnpmCjsPath}" "$@"\n`,
590+
{ encoding: "utf8", mode: 0o755 },
591+
);
592+
}
591593

592594
const forge = join(
593595
destinationFolder,

0 commit comments

Comments
 (0)