laurentj/slimerjs — pull request #210 by hallvors (2014-07-23 11:41:15+00:00)
Title: Fix for issue 196

Issue #196 covers two problems:

1) The .bat file(s) on Windows work too hard, end up double quoting the SLIMERJSLAUNCHER environment variable when it's deduced by the script. It's probably better to expect those who set it manually to quote it correctly. (An alternative fix would be not quoting it where it's first deduced and let slimerjs.bat deal with it)

2) Sometimes (if slimerjs.bat is called from other .bat files, like a Casper one), you can't correctly read the directory slimerjs.bat lives in with the %~dp0 command. Therefore we should allow users to set SLIMERDIR environment variable manually and not override it if it's set.

All based on http://luksurious.me/?p=64 - thanks!