valeryan / vscode-phpsab

Php Sniffer and Beautifier for VS Code
https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab
MIT License
58 stars 12 forks source link

Fails if Path contains Spaces on Mac and Windows #144

Closed aslamdoctor closed 1 week ago

aslamdoctor commented 1 month ago

Related issue: #136

I get the following error when trying to format a file in a path containing a Space:

SyntaxError: Unexpected token 'E', "ERROR: The"... is not valid JSON
["ERROR" - 10:25:58] ERROR: The file "Sites/xxx/app/public/... does not exist.
The file i am trying to format is in "/Local Sites/xxx/app/public/..." so i am rather sure that it is a problem passing the space to the formatter.

The previous version works fine. The path and the arguments passed to the command needs to be escaped.

jonathanbossenger commented 1 week ago

This should be fixed in the latest release.