diff --git a/muxplex/cli.py b/muxplex/cli.py index e4f1a45..74ee75e 100644 --- a/muxplex/cli.py +++ b/muxplex/cli.py @@ -723,7 +723,8 @@ def main() -> None: import sys print( - "Warning: 'install-service' is deprecated and will be removed in a future version.", + "Warning: 'install-service' is deprecated and will be removed in a future version." + " Use 'muxplex service install' instead.", file=sys.stderr, ) install_service(system=args.system) diff --git a/muxplex/tests/test_cli.py b/muxplex/tests/test_cli.py index 9bf4244..8899edc 100644 --- a/muxplex/tests/test_cli.py +++ b/muxplex/tests/test_cli.py @@ -969,6 +969,19 @@ def test_main_serve_subcommand_accepts_flags(): ) +def test_install_service_subcommand_prints_deprecation_warning(capsys): + """'muxplex install-service' must print a deprecation warning to stderr.""" + from muxplex.cli import main + + with patch("muxplex.cli.install_service"): + with patch("sys.argv", ["muxplex", "install-service"]): + main() + + captured = capsys.readouterr() + assert "deprecated" in captured.err.lower() + assert "muxplex service install" in captured.err + + def test_help_shows_single_upgrade_line(): """Help output shows 'upgrade (update)' alias notation, not two separate subcommand entries.""" import io