prevent crash when providing empty quoted prompt ("")

This commit is contained in:
Lincoln Stein 2022-10-25 15:56:07 -04:00
parent b1a2f4ab44
commit ca2f579f43

View File

@ -181,7 +181,9 @@ class Args(object):
switches_started = False
for element in elements:
if element[0] == '-' and not switches_started:
if len(element) == 0: # empty prompt
pass
elif element[0] == '-' and not switches_started:
switches_started = True
if switches_started:
switches.append(element)