Closed deepak1556 closed 3 months ago
@junstyle I can confirm that php-cs-fixer does not work anymore with the july 2024 (1.92.0) update of vs code.
It would be great if this can be resolved somehow. For now I downgraded to the june 2024 version - https://github.com/microsoft/vscode/issues/224550#issuecomment-2264770627. I have no immediate problem. But I do want to upgrade to newer versions. So it would be great if you can find some time to dive into this.
Thanks in advance!
while waiting for this extension update, here's how I make it working:
edit the index.js
in C:\Users\username\.vscode\junstyle.php-cs-fixer-0.3.13
find the keyword of ".spawn
" and add shell=true;
in 3rd parameter of the function,
// Before:
... function Rn(t,e,i,s=null){let n=(0,sg.spawn)(t,e,i),r=new Promise((o,h) ....
// After:
... function Rn(t,e,i,s=null){i.shell=true;let n=(0,sg.spawn)(t,e,i),r=new Promise((o,h) ....
in my case I just add i.shell=true;
save and then reload the vscode (Ctrl+Shift+P -> Reload Window)
What @walangkaji posted works in both insiders and main builds of vscode. Thank you!
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:
child_process.spawn
to execute a batch file on Windowsshell: true
orshell: process.platform === 'win32'
to the options objectPlease let us know if you run into issues or if you need clarification.
Happy coding!