soderlind / vscode-phpcbf

PHP Code Beautifier and Fixer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=persoderlind.vscode-phpcbf
GNU General Public License v3.0
28 stars 10 forks source link

Permission denied on format document #15

Open pragmaticjake opened 6 years ago

pragmaticjake commented 6 years ago

Latest PHPCS installed and working correctly (global wordpress extra).

Latest PHPCBF installed, and also set to wordpress extra.

On 'format document' in latest visual studio code these errors appear in the developer tools console. Any ideas?

`[Extension Host] PHP Warning: file_put_contents(//phpcbf-fixed.diff): failed to open stream: Permission denied in /usr/local/Cellar/php56/5.6.30_6/lib/php/PHP/CodeSniffer/Reporting.php on line 191

/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] PHP Warning: file_put_contents(//phpcbf-fixed.diff): failed to open stream: Permission denied in /usr/local/Cellar/php56/5.6.30_6/lib/php/PHP/CodeSniffer/Reporting.php on line 277

/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1306 ERR An unknown error occurred. Please consult the log for more details. /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] PHP Warning: file_put_contents(//phpcbf-fixed.diff): failed to open stream: Permission denied in /usr/local/Cellar/php56/5.6.30_6/lib/php/PHP/CodeSniffer/Reporting.php on line 191

/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] PHP Warning: file_put_contents(//phpcbf-fixed.diff): failed to open stream: Permission denied in /usr/local/Cellar/php56/5.6.30_6/lib/php/PHP/CodeSniffer/Reporting.php on line 277

/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1306 ERR An unknown error occurred. Please consult the log for more details.`

jyrkih commented 6 years ago

I get this also on OSX High Sierra, phpcs installed and working.

jakehills commented 6 years ago

It's not any kind of solution - but my mac got wiped and it works fine now - so I'm guessing it had something to do with /usr/ permissions for anyone else still struggling.