added engine version information in default help text
Showing
1 changed file
with
4 additions
and
3 deletions
... | @@ -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 | } | ... | ... |
-
Please register or sign in to post a comment