Commit 6779081d 6779081defd326ffd0b91795bf77ec45508b0591 by Nicolas Perriault

added engine version information in default help text

1 parent c636b968
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
28 * 28 *
29 */ 29 */
30 30
31 /*global process, console, phantom, require:true*/ 31 /*global process, console, phantom, slimer, require:true*/
32 /*jshint maxstatements:34, maxcomplexity:10*/ 32 /*jshint maxstatements:34, maxcomplexity:10*/
33 33
34 // node check 34 // node check
...@@ -162,10 +162,11 @@ CasperError.prototype = Object.getPrototypeOf(new Error()); ...@@ -162,10 +162,11 @@ CasperError.prototype = Object.getPrototypeOf(new Error());
162 * Prints CasperJS help. 162 * Prints CasperJS help.
163 */ 163 */
164 function printHelp() { 164 function printHelp() {
165 var phantomVersion = [phantom.version.major, phantom.version.minor, phantom.version.patch].join('.'); 165 var engine = phantom.casperEngine === 'slimerjs' ? slimer : phantom;
166 var version = [engine.version.major, engine.version.minor, engine.version.patch].join('.');
166 return __terminate([ 167 return __terminate([
167 'CasperJS version ' + phantom.casperVersion.toString() + 168 'CasperJS version ' + phantom.casperVersion.toString() +
168 ' at ' + phantom.casperPath + ', using PhantomJS version ' + phantomVersion, 169 ' at ' + phantom.casperPath + ', using ' + phantom.casperEngine + ' version ' + version,
169 fs.read(fs.pathJoin(phantom.casperPath, 'bin', 'usage.txt')) 170 fs.read(fs.pathJoin(phantom.casperPath, 'bin', 'usage.txt'))
170 ].join('\n')) 171 ].join('\n'))
171 } 172 }
......