diff --git a/changelogs/fragments/461-collection-dir.yml b/changelogs/fragments/461-collection-dir.yml new file mode 100644 index 00000000..ad79f0bf --- /dev/null +++ b/changelogs/fragments/461-collection-dir.yml @@ -0,0 +1,2 @@ +bugfixes: + - "Add ``--collection-dir`` to the ``antsibull-build`` ``collection`` and ``build-collection`` subcommands. Previously, the ``--collection-dir`` option was added to the wrong CLI argument parser and not exposed to users. (https://github.com/ansible-community/antsibull/pull/461)." diff --git a/src/antsibull/cli/antsibull_build.py b/src/antsibull/cli/antsibull_build.py index c81726a0..6f969670 100644 --- a/src/antsibull/cli/antsibull_build.py +++ b/src/antsibull/cli/antsibull_build.py @@ -331,8 +331,8 @@ def parse_args(program_name: str, args: List[str]) -> argparse.Namespace: ' versions which were included in this version of Ansible.' ' This is considered to be relative to --data-dir.' f' The default is {DEFAULT_FILE_BASE}-X.Y.Z.deps') - build_parser.add_argument('--collection-dir', default='.', - help='Directory to write collection to') + collection_parser.add_argument('--collection-dir', default='.', + help='Directory to write collection to') subparsers.add_parser('changelog', parents=[build_write_data_parser, cache_parser],