[eit.commands.bump] filter out last argument from outcome to avoid looping
This commit is contained in:
@@ -59,7 +59,8 @@ class EitBump(EitCommand):
|
||||
|
||||
def _startswith(string):
|
||||
if last_arg is not None:
|
||||
return string.startswith(last_arg)
|
||||
if last_arg not in outcome:
|
||||
return string.startswith(last_arg)
|
||||
return True
|
||||
|
||||
if self._args:
|
||||
@@ -67,6 +68,10 @@ class EitBump(EitCommand):
|
||||
# something after this.NAME.
|
||||
outcome = sorted(filter(_startswith, outcome))
|
||||
|
||||
for arg in self._args:
|
||||
if arg in outcome:
|
||||
outcome.remove(arg)
|
||||
|
||||
sys.stdout.write(" ".join(outcome) + "\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user