mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 22:56:15 +01:00
Bring the '--debug' option back to the 'buildinfo' command
It was automatically removed by the argument parser when resolving a conflict between buildinfo's --debug and the global --debug option. Now we're iterating backwards to give the command's options a priority over parent/global options.
This commit is contained in:
parent
fcc4b9cc7e
commit
53e204f275
@ -84,10 +84,14 @@ class Command:
|
||||
)
|
||||
|
||||
# traverse the parent commands and add their options to the current command
|
||||
commands = []
|
||||
cmd = self
|
||||
while cmd:
|
||||
cmd.init_arguments()
|
||||
commands.append(cmd)
|
||||
cmd = cmd.parent
|
||||
# iterating backwards to give the command's options a priority over parent/global options
|
||||
for cmd in reversed(commands):
|
||||
cmd.init_arguments()
|
||||
|
||||
def __repr__(self):
|
||||
return f"<osc plugin {self.full_name} at {self.__hash__():#x}>"
|
||||
|
Loading…
Reference in New Issue
Block a user