1
0
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:
Daniel Mach 2022-08-01 08:30:06 +02:00 committed by GitHub
commit be5492581a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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