-
Notifications
You must be signed in to change notification settings - Fork 14
🤖 fix: add cross-platform path handling for 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
Conversation
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".
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".
8c7db4a to
d540ea3
Compare
d540ea3 to
2acdfbf
Compare
- Revert SSHRuntime/LocalRuntime/process cleanup edits - Remove platform-specific path layer and UI formatting - Restore bashExecutionService, execAsync, tests to main - Keep Windows build: Makefile bash shell + release.yml Windows job + setup-cmux action Only 3 files changed vs main: Makefile, release.yml, setup-cmux action.yml _Generated with `cmux`_.
…#572) This PR improves Windows build compatibility by introducing a conditional `RUNNER` variable in the Makefile. - **Add RUNNER variable** that conditionally uses: - `npx` on Windows (where `bun x` doesn't correctly pass arguments) - `bun x` on non-Windows systems for better performance - **Update all 30+ commands** to use `$(RUNNER)` instead of hardcoded `bun x` or `npx` - **Add explanatory comments** for Windows-specific behavior On Windows, `bun x` doesn't correctly pass arguments to commands, causing build failures. This change ensures consistent build behavior across all platforms by using the appropriate tool for each OS. ```makefile ifeq ($(OS),Windows_NT) RUNNER := npx else RUNNER := bun x endif ``` All commands now use `$(RUNNER)` for cross-platform compatibility. _Generated with `cmux`_
95b7df0 to
b09c032
Compare
- Add PlatformPaths class to handle Windows and Unix paths correctly - Replace all direct path operations with PlatformPaths methods - Support Windows drive letters, UNC paths, and backslash separators - Maintain consistent path abbreviation across platforms - Add comprehensive tests for all path operations
- Remove unused path imports - Add eslint-disable comments for process usage in paths.ts (main-only functions) - Ensure compatibility with both main and renderer contexts
Adds comprehensive cross-platform path handling to support Windows builds alongside Unix systems.
Changes
New PlatformPaths utility class - Single source of truth for all path operations
Replaced all direct path operations throughout the codebase:
path.basename()→PlatformPaths.basename()expandTilde()→PlatformPaths.expandHome()abbreviatePath()→PlatformPaths.abbreviate()PlatformPaths.parse()Comprehensive test coverage - Tests verify correct behavior on both platforms
Testing
Generated with
mux