fixed phantom.casperPath was always redefined by cli argument value
Showing
1 changed file
with
3 additions
and
2 deletions
... | @@ -56,8 +56,9 @@ | ... | @@ -56,8 +56,9 @@ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | phantom.casperArgs = phantom.extractCasperArgs(phantom.args); | 58 | phantom.casperArgs = phantom.extractCasperArgs(phantom.args); |
59 | phantom.casperPath = phantom.casperArgs.options['casper-path']; | 59 | if (!phantom.casperPath) { |
60 | //console.log(JSON.stringify(phantom.casperArgs, null, 4)) | 60 | phantom.casperPath = phantom.casperArgs.options['casper-path']; |
61 | } | ||
61 | 62 | ||
62 | if (!phantom.casperPath) { | 63 | if (!phantom.casperPath) { |
63 | console.log('Cannot find CasperJS home path. Did you set phantom.casperPath or pass the --casper-path option?'); | 64 | console.log('Cannot find CasperJS home path. Did you set phantom.casperPath or pass the --casper-path option?'); | ... | ... |
-
Please register or sign in to post a comment