Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit32b5122

Browse files
authored
Merge pull request#601 from max-wittig/fix/help-usage
fix(cli): print help and usage without config file
2 parents3a8b1a0 +6bb4d17 commit32b5122

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎gitlab/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _get_base_parser(add_help=True):
9898
"will be used."),
9999
required=False)
100100
parser.add_argument("-o","--output",
101-
help=("Output format (v4 only): json|legacy|yaml"),
101+
help="Output format (v4 only): json|legacy|yaml",
102102
required=False,
103103
choices=['json','legacy','yaml'],
104104
default="legacy")
@@ -135,6 +135,10 @@ def main():
135135
exit(0)
136136

137137
parser=_get_base_parser(add_help=False)
138+
if"--help"insys.argvor"-h"insys.argv:
139+
parser.print_help()
140+
exit(0)
141+
138142
# This first parsing step is used to find the gitlab config to use, and
139143
# load the propermodule (v3 or v4) accordingly. At that point we don't have
140144
# any subparser setup

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp