Commit a918f248 a918f24824d8871ca0fa3c1c0d92d89c98034eb6 by Nicolas Perriault

fixed bootstrap script

which was preventing for script and modules to be properly loaded
and executed.
1 parent b02269c0
...@@ -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 if (!fs.isFile(phantom.casperScript)) {
297 console.error('Unable to open file: ' + phantom.casperScript);
298 phantom.exit(1);
299 } else {
300 // filter out the called script name from casper args
301 phantom.casperArgs.drop(phantom.casperScript);
302 296
303 // passed casperjs script execution 297 if (!fs.isFile(phantom.casperScript)) {
304 phantom.injectJs(phantom.casperScript); 298 console.error('Unable to open file: ' + phantom.casperScript);
305 } 299 phantom.exit(1);
306 } 300 }
301
302 // filter out the called script name from casper args
303 phantom.casperArgs.drop(phantom.casperScript);
304
305 // passed casperjs script execution
306 phantom.injectJs(phantom.casperScript);
307 }; 307 };
308 308
309 if (!phantom.casperLoaded) { 309 if (!phantom.casperLoaded) {
......