fixed bootstrap script
which was preventing for script and modules to be properly loaded and executed.
Showing
1 changed file
with
4 additions
and
4 deletions
... | @@ -292,18 +292,18 @@ function bootstrap(global) { | ... | @@ -292,18 +292,18 @@ function bootstrap(global) { |
292 | 292 | ||
293 | if (!phantom.casperScript) { | 293 | if (!phantom.casperScript) { |
294 | phantom.casperScript = phantom.casperArgs.get(0); | 294 | phantom.casperScript = phantom.casperArgs.get(0); |
295 | } else { | 295 | } |
296 | |||
296 | if (!fs.isFile(phantom.casperScript)) { | 297 | if (!fs.isFile(phantom.casperScript)) { |
297 | console.error('Unable to open file: ' + phantom.casperScript); | 298 | console.error('Unable to open file: ' + phantom.casperScript); |
298 | phantom.exit(1); | 299 | phantom.exit(1); |
299 | } else { | 300 | } |
301 | |||
300 | // filter out the called script name from casper args | 302 | // filter out the called script name from casper args |
301 | phantom.casperArgs.drop(phantom.casperScript); | 303 | phantom.casperArgs.drop(phantom.casperScript); |
302 | 304 | ||
303 | // passed casperjs script execution | 305 | // passed casperjs script execution |
304 | phantom.injectJs(phantom.casperScript); | 306 | phantom.injectJs(phantom.casperScript); |
305 | } | ||
306 | } | ||
307 | }; | 307 | }; |
308 | 308 | ||
309 | if (!phantom.casperLoaded) { | 309 | if (!phantom.casperLoaded) { | ... | ... |
-
Please register or sign in to post a comment