Skip to content
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

⚡ Make sure Neutralino binaries have the right permissions #284

Merged

Conversation

CosmoMyzrailGorynych
Copy link
Contributor

@CosmoMyzrailGorynych CosmoMyzrailGorynych commented Dec 18, 2024

A Mac user of ct.js reported that npx @neutralinojs/neu create neuTestApp downloaded binaries without the +x flags, which lead to EPERM errors or Executable not found in $PATH when run through other tools. Though I myself could not replicate it in a Mac VM, I suppose it is due to some security measure in newer macOS versions.

This PR adds a simple fs.chmodSync call on every non-windows binary when run on system other than Windows to make sure the executables have the right execution flags.

It also makes a function-less change to regEx statements in the code so VSCode's syntax highlighter doesn't break. (<pattern>{N,M} are used for quantifiers and ir seems that VSCode tokenizer detects any {} pair as one.)

This is not needed syntax-wise but it drove syntax highlighting in VSCode mad, as {} are usually used for quantifiers in regEx.
@CosmoMyzrailGorynych
Copy link
Contributor Author

Fun fact: I've just replicated the issue with missing +x flags on Fedora 41.

Copy link
Member

@shalithasuranga shalithasuranga left a comment

Choose a reason for hiding this comment

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

Thanks so much for sending this fix @CosmoMyzrailGorynych 🎉

@shalithasuranga shalithasuranga merged commit c233fb2 into neutralinojs:main Dec 21, 2024
2 checks passed
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.

2 participants