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

fix whitespace module execSync under Windows with no shebang #3100

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zaycker
Copy link

@zaycker zaycker commented Mar 4, 2025

fixes #2700

In case the eslint version is 8, whitespace.js file tries to execute whitespace-async.js file.
whitespace-async.js file starts with shebang header #!/usr/bin/env node which doesn't work under Windows.
It cannot be executed right away without definition of interpreter.
In case we try to execute it with execSync or any other fork tool it opens up a dialog for choosing a program to open the .js file.
It requires explicit definition of node interpreter at the place of execution.
windowsHide option prevents opening of cmd window during execution and it is ignored under non-Windows systems.

there is another PR which is outdated. made a fresh one

@zaycker zaycker changed the title fix whitespace module execSync under Windows with no shebang #2700 fix whitespace module execSync under Windows with no shebang Mar 4, 2025
@ljharb
Copy link
Collaborator

ljharb commented Mar 4, 2025

This is a duplicate of #2706. Please don't file duplicate PRs - if one is outdated, you can comment on that PR with your branch and maintainers can pull it in.

@ljharb ljharb marked this pull request as draft March 4, 2025 07:22
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.

Unexpected end of JSON input
2 participants