benmatselby/sublime-phpcs — Issue #4: Issues on Mac 10.7.3
Author: baileylo
Created: 2012-03-03 06:35:50+00:00
State: open

Hey, can't seem to get it working correctly on my mac. Here's the debug information I could muster.

>>> print sys.version
2.6.7 (r267:88850, Jul 31 2011, 19:30:54)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]

[Phpcs] phpcs --report=checkstyle -n --standard=PEAR /Users/loganbailey/Desktop/testScript.php
Traceback (most recent call last):
File "./sublime_plugin.py", line 350, in run_
File "./phpcs.py", line 192, in run
File "./phpcs.py", line 141, in run
File "./phpcs.py", line 61, in get_errors
File "./phpcs.py", line 98, in execute
File "./phpcs.py", line 101, in parse_report
File "./phpcs.py", line 71, in shell_out
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

The issue comes from this line:
https://github.com/benmatselby/sublime-phpcs/blob/master/phpcs.py#L71

I tried changing the line to the following:
```
proc = subprocess.Popen(' '.join(cmd), stdout=subprocess.PIPE, shell=True)
```

That ran successfully, but the output is incorrect.