-
Notifications
You must be signed in to change notification settings - Fork 12
fix: Windows compatibility #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…to build and publish NSIS .exe\n- Install ImageMagick on Windows in setup-cmux action\n- Set Windows icon and artifactName in electron-builder config\n\n_Generated with _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ## Development | ||
| dev: node_modules/.installed build-main ## Start development server (Vite + tsgo watcher for 10x faster type checking) | ||
| @bun x concurrently -k \ | ||
| "bun x concurrently \"$(TSGO) -w -p tsconfig.main.json\" \"bun x tsc-alias -w -p tsconfig.main.json\"" \ | ||
| "vite" | ||
| @npx concurrently -k --raw \ | ||
| "$(TSGO) -w -p tsconfig.main.json" \ | ||
| "bun tsc-alias -w -p tsconfig.main.json" \ | ||
| "bun x vite" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dev target calls nonexistent Bun binary
The dev recipe now launches bun tsc-alias -w -p tsconfig.main.json, but Bun only executes package binaries through bun x (or a script in package.json). Without that, the command fails with “could not find script or file tsc-alias” and the development server never starts. This regression blocks local development on every platform. Use bun x tsc-alias (or npx) as before so the watcher can run.
Useful? React with 👍 / 👎.
| /** | ||
| * Shescape instance for bash shell escaping. | ||
| * Reused across all SSH runtime operations for performance. | ||
| * Shescape properly auto-detects win32 & linux shells, but fails on macOS. | ||
| */ | ||
| const shescape = new Shescape({ shell: "bash" }); | ||
| const shescape = new Shescape({ shell: process.platform === "darwin" ? "bash" : true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escaping remote SSH commands using local shell semantics
The shared Shescape instance now auto-detects the local shell (new Shescape({ shell: process.platform === "darwin" ? "bash" : true })). SSHRuntime builds command strings that are always executed remotely via bash -c, so escaping must consistently follow bash rules. When the client runs on Windows, auto-detection returns cmd.exe semantics and inserts caret/double-quote escaping that bash interprets literally, causing SSH commands with spaces or special characters to fail. Keep the shell fixed to "bash" (or handle Windows separately on the remote side) to preserve correct quoting.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ifeq ($(OS),Windows_NT) | ||
| SHELL := /usr/bin/bash | ||
| else | ||
| SHELL := /bin/bash | ||
| endif | ||
| .SHELLFLAGS := -eu -o pipefail -c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use bash path that doesn’t exist on Windows
When $(OS)=Windows_NT) the Makefile now sets SHELL := /usr/bin/bash. Chocolatey’s make (used in the new build-windows workflow) ships only with sh.exe and there is no /usr/bin/bash on the default windows-latest runner or most developer environments. make will attempt to invoke that literal path and immediately exit with CreateProcess(/usr/bin/bash …) failed before any target runs, so bun run build in the Windows release job will fail. Use SHELL := bash (resolved from PATH) or a valid Windows path to bash instead.
Useful? React with 👍 / 👎.
Generated with .
This PR improves Windows build compatibility:
If you want me to expand the description with specific diffs, say "elaborate".