fix(cli): remove invalid --cwd flag config and make upgrade a proper alias
- Remove is_flag=False + flag_value="." combination which has no effect on click option with is_flag=False (default) - Create dedicated click.Command for upgrade instead of raw alias assignment, so help shows correct command name
This commit is contained in:
@@ -37,8 +37,6 @@ def _resolve_chat_cwd() -> Path:
|
|||||||
@click.option(
|
@click.option(
|
||||||
"--cwd",
|
"--cwd",
|
||||||
"-C",
|
"-C",
|
||||||
is_flag=False,
|
|
||||||
flag_value=".",
|
|
||||||
default=None,
|
default=None,
|
||||||
type=click.Path(dir_okay=True, file_okay=False),
|
type=click.Path(dir_okay=True, file_okay=False),
|
||||||
help="Use specified path as working directory (default: workspace/).",
|
help="Use specified path as working directory (default: workspace/).",
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
"""CLI subcommands."""
|
"""CLI subcommands."""
|
||||||
|
|
||||||
|
import click
|
||||||
|
|
||||||
from .update import update_cmd
|
from .update import update_cmd
|
||||||
|
|
||||||
# alias: upgrade is the same as update
|
|
||||||
upgrade_cmd = update_cmd
|
|
||||||
|
|
||||||
__all__ = ["update_cmd", "upgrade_cmd"]
|
__all__ = ["update_cmd", "upgrade_cmd"]
|
||||||
|
|
||||||
|
|
||||||
|
@click.command("upgrade")
|
||||||
|
def upgrade_cmd() -> None:
|
||||||
|
"""Alias for update: reinstall myclaude from this repository."""
|
||||||
|
return click.get_current_context().invoke(update_cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user