diff --git a/slpkg/main.py b/slpkg/main.py index d36d66cd..b97b5a7d 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -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. """