Skip to content

Commit

Permalink
--package overrides --input
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Nov 9, 2024
1 parent ccc2722 commit 1d79328
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion newversion/cli_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ def parse_args(args: Sequence[str]) -> CLINamespace:
"-p",
"--package",
action="store_true",
help="Get or set Python package version. Supports pyproject.toml, setup.cfg and setup.py.",
help=(
"Get Python package version as input, overrides --input and pipe in."
" Supports pyproject.toml, setup.cfg and setup.py."
),
)
parser.add_argument(
"-s",
Expand Down
2 changes: 1 addition & 1 deletion newversion/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def main_api(config: CLINamespace) -> str:
version=config.version,
path=config.path,
)
if config.package and config.version == Version.zero():
if config.package:
executor.version = executor.command_get_version()
try:
result = _run_main_api(executor, config)
Expand Down

0 comments on commit 1d79328

Please sign in to comment.