ronaldlokers/grunt-casperjs — pull request #30 by theefer (2013-10-01 15:50:27+00:00)
Title: Fix symlinking of already installed version

A [recent change](https://github.com/ronaldlokers/grunt-casperjs/commit/4666f72b2ed06d5aa6381d913ad038c9ab2bbda2) for windows compatibility broke the support for using an already installed CasperJS altogether, by causing the casperjs symlink at the root of the module to point to an imaginary file named after the installed version, e.g.

```
$ ls -l node_modules/grunt-casperjs/casperjs
lrwxrwxrwx 1 seb seb 9 Oct 1 16:46 node_modules/grunt-casperjs/casperjs -> 1.1.0-DEV
```

This patch fixes the problem, while still looking up the version for logging. However this is likely not working on Windows, as the prior change hinted that `which` does not work on Windows.

If anyone can think of a better way to look up the path of an installed program in an OS-agnostic (i.e. Windows-friendly) way, please shout and I will adapt my pull request. I'm forced to use this for now as I'm otherwise unable to run grunt-casperjs at all anymore...