mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 10:16:14 +01:00
Merge pull request #1091 from abitrolly/helpanon
Do not ask for login for `-h,--help`
This commit is contained in:
commit
be5492581a
@ -126,7 +126,11 @@ class Osc(cmdln.Cmdln):
|
||||
def postoptparse(self):
|
||||
"""merge commandline options into the config"""
|
||||
|
||||
if not self.args or self._get_canonical_cmd_name(self.args[0]) == "help":
|
||||
if (
|
||||
not self.args
|
||||
or self._get_canonical_cmd_name(self.args[0]) == "help"
|
||||
or {'-h', '--help'} & set(self.args)
|
||||
):
|
||||
# avoid loading config that may trigger prompt for username, password etc.
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user