Updated for split options

This commit is contained in:
Dimitris Zlatanidis 2023-05-05 21:42:06 +03:00
parent d86c997eeb
commit 516d9320ec

View file

@ -388,8 +388,7 @@ class Argparse(Configs):
try:
if arg.startswith(self.flag_short_directory):
self.directory: str = self.args[self.args.index(arg) + 1]
self.args.remove(arg)
self.args.append(self.flag_short_directory)
self.args.remove(self.directory)
except IndexError:
self.directory: Path = self.tmp_slpkg
@ -401,10 +400,9 @@ class Argparse(Configs):
try:
if arg.startswith(self.flag_short_repository):
self.repository: str = self.args[self.args.index(arg) + 1]
self.args.remove(arg)
self.args.append(self.flag_short_repository)
self.args.remove(self.repository)
except IndexError:
self.repository = ''
self.repository: str = ''
def move_options(self) -> None:
""" Move options to the flags and removes from the arguments. """