csscomb/csscomb.js — pull request #151 by tonyganch (2013-12-28 04:34:43+00:00)
Title: Stop searching config if we reach root directory

See csscomb/grunt-csscomb#19

If project is located not under `HOME` (e.g. `/var/test`) and we try to comb some files, we get an error:
```
$ cd /var/test && csscomb foo.css

path.js:299
return splitPathRe.exec(filename).slice(1);
^
RangeError: Maximum call stack size exceeded
```

The problem is in `getConfigPath` function which stops searching config only after reaching `HOME`.
And as we can't get there from `/var/test`, we get into infinite loop instead.
This can be solved by comparing to root as well.
And since there appears to be no good way to get root path in Windows, assume that if current dir has no parent dir, we're in root.

![post-18511-i-m-outta-here-mlkshk-91ab](https://f.cloud.github.com/assets/872004/1817144/c7449f78-6f78-11e3-993c-b6478062b8bb.gif)