diff --git a/slpkg/main.py b/slpkg/main.py index b6d98d83..3f19525f 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -270,6 +270,7 @@ class Argparse(Configs): """ Checks for invalid options. """ invalid: list = [] commands: list = [] + doubles: list = [] for arg in self.args: if arg[0] == '-' and arg in self.commands.keys(): @@ -278,6 +279,14 @@ class Argparse(Configs): invalid.append(arg) elif arg[0] == '--' and arg not in self.options: invalid.append(arg) + elif arg[0] == '-' and arg in self.options: + doubles.append(arg) + + # Fixed for doubles options. + if doubles: + for opt in doubles: + print(f"{self.prog_name}: invalid double option '{opt}'") + self.usage.help_minimal() # Fixed for invalid commands combination. if len(commands) > 1: