8000 fix: remove Windows-specific cleanup from postinstall script by Ax-0m · Pull Request #3911 · electron/forge · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: remove Windows-specific cleanup from postinstall script #3911

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

Closed
wants to merge 1 commit into from

Conversation

Ax-0m
Copy link
@Ax-0m Ax-0m commented Apr 4, 2025

Description

This PR addresses a cross-platform compatibility issue in the postinstall script that affects non-Windows systems.

Changes

  • Remove rimraf node_modules/.bin/*.ps1 from postinstall script
  • Add CROSS_PLATFORM.md with documentation and future considerations
  • Improve cross-platform compatibility for non-Windows systems

Problem

The postinstall script was failing on Unix systems (macOS/Linux) because it attempted to remove Windows PowerShell scripts (.ps1) that don't exist on these platforms. This prevented the essential TypeScript configuration generation steps from completing successfully.

Solution

  • Removed the Windows-specific cleanup step that was causing the failure
  • Added comprehensive documentation in CROSS_PLATFORM.md explaining the change and providing future considerations
  • Maintained all essential functionality while improving cross-platform compatibility

Testing

  • Verified installation on macOS (darwin 24.3.0)
  • Successfully ran yarn test:fast with all tests passing
  • Confirmed build process works correctly on Unix systems
  • Maintained backward compatibility with Windows systems

This change resolves the postinstall script failure on Unix systems while preserving the core functionality of the TypeScript configuration generation steps.

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

- Remove rimraf node_modules/.bin/*.ps1 from postinstall script

- Add CROSS_PLATFORM.md with documentation and future considerations

- Improve cross-platform compatibility for non-Windows systems

This change fixes the postinstall script failure on non-Windows systems where PowerShell scripts do not exist, while maintaining the essential TypeScript configuration generation steps.

Resolves issue with postinstall script failing on Unix systems.
@Ax-0m Ax-0m requested a review from a team as a code owner April 4, 2025 04:34
Copy link
Member
@malept malept left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. Why is there a new document for a contributor to read, instead of just creating the script that's literally written in a code block in the doc?

Also, it would help if you provided detailed steps to reproduce this issue on either macOS or Linux, plus the OS/architecture/Node.js version that you used. I am surprised that this would be an issue, given that most contributors either use macOS or Linux.

Copy link
Member
@erickzhao erickzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is true? I do all my dev work on macOS and the rimraf command doesn't fail.

@erickzhao erickzhao closed this Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0