benmatselby / sublime-phpcs

🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text
Other
814 stars 126 forks source link

Windows: CWD call throws exception #121

Closed younes0 closed 10 years ago

younes0 commented 10 years ago

Well it's more of a support question I guess, I just can't figure out this one:

Writing file /C/Users/Younes/Desktop/1.php with encoding UTF-8 (atomic)
[Phpcs] E:\Programs\xampp\php\phpcs.bat -l -d display_errors=On C:\Users\Younes\Desktop\1.php
[Phpcs] E:\Programs\xampp\php\phpcs.bat -l -d display_errors=On C:\Users\Younes\Desktop\1.php
[Phpcs] cwd: E:ProgramsGit
Exception in thread Thread-5:
Traceback (most recent call last):
  File "./subprocess.py", line 1112, in _execute_child
NotADirectoryError: [WinError 267] The directory name is invalid

See [Phpcs] cwd: E:ProgramsGit Why does PHPCs think that current directory is "E:\Programs\Git" (the 1.php folder is not a git repo) and more importantly, how come it removes the slashes ? E:\Programs\xampp\php\phpcs.bat -l -d display_errors=On C:\Users\Younes\Desktop\1.php works fine btw

Thanks for your lib, can't work without it.

benmatselby commented 10 years ago

Hi there.

The question about why PHP_CodeSniffer thinks it is in E:ProgramsGit would need to be directed at the people who build PHP_CodeSniffer I'm afraid.

I'm assuming this isn't working for you now? Have you defined where the path of phpcs.bat is?

younes0 commented 10 years ago

Thanks Ben, I try to not ask support questions on github but I couldn't figure out this one. The thing is I was only using the Linting feature with your package all these days :) so I switched to sublimeLinter for that single purpose.