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

Unify various exec calls #81

Closed
4 of 5 tasks
chenglou opened this issue Feb 6, 2021 · 2 comments
Closed
4 of 5 tasks

Unify various exec calls #81

chenglou opened this issue Feb 6, 2021 · 2 comments

Comments

@chenglou
Copy link
Member

chenglou commented Feb 6, 2021

I'll cc @cristianoc, @mewhhaha and @john-pangalos (sorry for the ping) on this one.

Currently in the codebase there are 3 ways to call a binary:

We should really revisit those and streamline them:

  • First one:
    • should be execFile, which avoids needing to escape the command path.
    • should also be sync.
    • should work on windows, if it isn't.
  • Second one:
    • should use execFile in the win32 branch too, to avoid needing to escape path. Can't use that for a batch script
  • Third one
chenglou added a commit that referenced this issue Feb 6, 2021
…83)

* execSync -> execFileSync for RescriptEditorSupport binary invocation

Part of #81

* No need to quote any path in RescriptEditorSupport anymore
@mewhhaha
Copy link
Contributor

mewhhaha commented Feb 7, 2021

For the second case we followed the documentation on NodeJS. Is it possible to get around that if the file is a script?

What's the condition for getting the popup for starting this process? Is it by having a single .res file open in the project?

@chenglou
Copy link
Member Author

Oh right, yeah thanks for the reminder. I've finally understood the little complexities here. (Thanks also to @bsansouci for debugging on windows with me). d1dc096 fixes everything.

Thanks again!

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

No branches or pull requests

2 participants