Skip to content

Commit 25fc65a

Browse files
meteozondJohnVillalovos
authored andcommitted
fix(cli): changed default allow_abbrev value to fix arguments collision problem
The `--job` argument could be interpreted as `--job-token` Example failure: $ gitlab \ --private-token ${GITLAB_API_KEY} -o json \ project-artifact download \ --project-id mdm/entities \ --job ${JOB} \ --ref-name ${REF} \ gitlab: error: argument --job-token: not allowed with argument --private-token
1 parent 9e64645 commit 25fc65a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitlab/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ def cls_to_what(cls: RESTObject) -> str:
106106

107107
def _get_base_parser(add_help: bool = True) -> argparse.ArgumentParser:
108108
parser = argparse.ArgumentParser(
109-
add_help=add_help, description="GitLab API Command Line Interface"
109+
add_help=add_help,
110+
description="GitLab API Command Line Interface",
111+
allow_abbrev=False,
110112
)
111113
parser.add_argument("--version", help="Display the version.", action="store_true")
112114
parser.add_argument(

0 commit comments

Comments
 (0)