Commit a4b5c575 a4b5c5751d9f36c1495f75542aa46417f0db3bbf by Nicolas Perriault

fixed casperjs executable could not handle a PHANTOMJS_EXECUTABLE containing spaces

1 parent 66a880f9
...@@ -10,9 +10,10 @@ def resolve(path): ...@@ -10,9 +10,10 @@ def resolve(path):
10 return resolve(os.readlink(path)) 10 return resolve(os.readlink(path))
11 return path 11 return path
12 12
13 PHANTOMJS_EXEC = os.environ.get('PHANTOMJS_EXECUTABLE', 'phantomjs') 13 PHANTOMJS_EXEC = os.environ.get('PHANTOMJS_EXECUTABLE', 'phantomjs').split(' ')
14 CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), '..')) 14 CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), '..'))
15 CASPER_ARGS = [PHANTOMJS_EXEC, os.path.join(CASPER_PATH, 'bin', 'bootstrap.js'), '--casper-path=%s' % CASPER_PATH, '--cli'] 15 CASPER_ARGS = PHANTOMJS_EXEC
16 CASPER_ARGS.extend([os.path.join(CASPER_PATH, 'bin', 'bootstrap.js'), '--casper-path=%s' % CASPER_PATH, '--cli'])
16 CASPER_ARGS.extend(sys.argv[1:]) 17 CASPER_ARGS.extend(sys.argv[1:])
17 18
18 try: 19 try:
......