Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/semantic_release/cli/commands/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def get_command(self, _ctx: click.Context, name: str) -> click.Command | None:
cls=Cli,
context_settings={
"help_option_names": ["-h", "--help"],
"resilient_parsing": True,
},
)
@click.version_option(
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
)

# Evaluate
assert SUCCESS_EXIT_CODE == proc.returncode # noqa: SIM300

Check failure on line 47 in tests/e2e/test_main.py

View workflow job for this annotation

GitHub Actions / validate / Python 3.14 on ubuntu-latest E2E tests

test_main.test_entrypoint_scripts[psr]

assert == failed. [pytest-clarity diff shown] #x1B[0m #x1B[0m#x1B[32mLHS#x1B[0m vs #x1B[31mRHS#x1B[0m shown below #x1B[0m #x1B[0m#x1B[32m+ 0#x1B[0m #x1B[0m#x1B[31m- 2#x1B[0m #x1B[0m

Check failure on line 47 in tests/e2e/test_main.py

View workflow job for this annotation

GitHub Actions / validate / Python 3.14 on ubuntu-latest E2E tests

test_main.test_entrypoint_scripts[python-semantic-release]

assert == failed. [pytest-clarity diff shown] #x1B[0m #x1B[0m#x1B[32mLHS#x1B[0m vs #x1B[31mRHS#x1B[0m shown below #x1B[0m #x1B[0m#x1B[32m+ 0#x1B[0m #x1B[0m#x1B[31m- 2#x1B[0m #x1B[0m

Check failure on line 47 in tests/e2e/test_main.py

View workflow job for this annotation

GitHub Actions / validate / Python 3.14 on ubuntu-latest E2E tests

test_entrypoint_scripts[psr] assert == failed. [pytest-clarity diff shown] LHS vs RHS shown below + 0 - 2

Check failure on line 47 in tests/e2e/test_main.py

View workflow job for this annotation

GitHub Actions / validate / Python 3.14 on ubuntu-latest E2E tests

test_entrypoint_scripts[python-semantic-release] assert == failed. [pytest-clarity diff shown] LHS vs RHS shown below + 0 - 2
assert expected_output == proc.stdout
assert not proc.stderr

Expand All @@ -60,12 +60,12 @@
assert result.output == f"semantic-release, version {__version__}\n"


def test_main_no_args_passes_w_help_text():
def test_main_no_args_fails_w_help_text():
from semantic_release.cli.commands.main import main

cli_cmd = [MAIN_PROG_NAME]
result = CliRunner().invoke(main, prog_name=cli_cmd[0])
assert_successful_exit_code(result, cli_cmd)
assert_exit_code(2, result, cli_cmd)
assert "Usage: " in result.output


Expand Down
Loading