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

Notification of breaking api change with v1.92 release of VS Code #6115

Closed
deepak1556 opened this issue Jul 11, 2024 · 2 comments
Closed

Notification of breaking api change with v1.92 release of VS Code #6115

deepak1556 opened this issue Jul 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@deepak1556
Copy link

Hello from the VS Code team 👋

In our next release v1.92, we will update to Electron 30 which includes Node.js 20.14.0. This Node version contains a breaking change, in response to a CVE, which may affect you if you execute .bat or .cmd files on Windows. Based on a simple scan of your extension's source code, you may be impacted by this change. The stable VS Code that contains this update will be released in early August.

Action: please try out your extension on this month's VS Code Insiders on Windows. If you are affected by this change, you will encounter an EINVAL error when you try to spawn a bat/cmd file.

Node.js has added a section on batch file spawning to their documentation. To fix any issues:

  1. Find locations where you call child_process.spawn to execute a batch file on Windows
  2. Add shell: true or shell: process.platform === 'win32' to the options object
  3. If the batch script path may contain spaces, you will also need to wrap the path in quotation marks.

Please let us know if you run into issues or if you need clarification.

Happy coding!

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Jul 11, 2024
@debonte debonte added needs investigation Could be an issue - needs investigation and removed needs repro Issue has not been reproduced yet labels Jul 11, 2024
@debonte
Copy link
Contributor

debonte commented Jul 11, 2024

Rich suggested that in some configurations (conda?) the intepreter path might be a .cmd/.bat file rather than an .exe. Assuming it's safe to set the shell option (as described above) even if the command being run is an .exe, we might want to change that spawn call just to be safe.

@debonte debonte added bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed needs investigation Could be an issue - needs investigation labels Aug 8, 2024
@KacieKK
Copy link
Contributor

KacieKK commented Aug 13, 2024

This issue has been fixed in prerelease version 2024.8.101, which we've just released. You can find the changelog here: CHANGELOG.md

@KacieKK KacieKK closed this as completed Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants