Commit ff93a482 ff93a482d22cb4bdbd0cea06e9e3e99cb5108c40 by Nicolas Perriault

fixed casperjs executable crash when no args is passed

1 parent c2b869c1
...@@ -45,7 +45,7 @@ CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), ' ...@@ -45,7 +45,7 @@ CASPER_PATH = os.path.abspath(os.path.join(os.path.dirname(resolve(__file__)), '
45 PHANTOMJS_ARGS = [] 45 PHANTOMJS_ARGS = []
46 SYS_ARGS = sys.argv[1:] 46 SYS_ARGS = sys.argv[1:]
47 47
48 if SYS_ARGS[0] == '__selfcommandtest': 48 if len(SYS_ARGS) and SYS_ARGS[0] == '__selfcommandtest':
49 print('Starting Python executable tests...') 49 print('Starting Python executable tests...')
50 pkg_version = json.loads(open('package.json').read()).get('version') 50 pkg_version = json.loads(open('package.json').read()).get('version')
51 scripts_path = os.path.join(CASPER_PATH, 'tests', 'commands') 51 scripts_path = os.path.join(CASPER_PATH, 'tests', 'commands')
......