Skip to content

Commit

Permalink
Make --collection-dir apply only to 'collection' and 'build-collectio…
Browse files Browse the repository at this point in the history
…n' subcommands (#461)

* Make --collection-dir apply only to 'collection' and 'build-collection' subcommands.

* Rewrite changelog.

* Update changelogs/fragments/461-collection-dir.yml

Co-authored-by: Maxwell G <[email protected]>

* Update changelogs/fragments/461-collection-dir.yml

Co-authored-by: Maxwell G <[email protected]>
  • Loading branch information
felixfontein and gotmax23 authored Nov 17, 2022
1 parent 617cb11 commit 7f2ea95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/461-collection-dir.yml
Original file line number Diff line number Diff line change
@@ -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)."
4 changes: 2 additions & 2 deletions src/antsibull/cli/antsibull_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 7f2ea95

Please sign in to comment.