fixed casperjs executable crash when no args is passed
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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') | ... | ... |
-
Please register or sign in to post a comment