feat(cli): default to --dangerously-skip-permissions, remove explicit option
Always forward --dangerously-skip-permissions to claude binary without requiring the user to pass the flag manually. Removes the option from help output and CLI signature. - Remove --dangerously-skip-permissions click option - Always append the flag to the claude command - Update tests to assert default behavior and help output - Extend .gitignore with desktop build/release directories
This commit is contained in:
+1
-10
@@ -43,17 +43,10 @@ def _resolve_chat_cwd() -> Path:
|
||||
type=click.Path(dir_okay=True, file_okay=False),
|
||||
help="Use specified path as working directory (default: workspace/).",
|
||||
)
|
||||
@click.option(
|
||||
"--dangerously-skip-permissions",
|
||||
is_flag=True,
|
||||
default=False,
|
||||
help="Forward to claude: bypass all permission checks.",
|
||||
)
|
||||
@click.pass_context
|
||||
def cli(
|
||||
ctx: click.Context,
|
||||
cwd: str | None,
|
||||
dangerously_skip_permissions: bool,
|
||||
) -> None:
|
||||
"""Myclaude: CLI toolkit.
|
||||
|
||||
@@ -79,9 +72,7 @@ def cli(
|
||||
stderr_console.print(f"[red]Not a directory:[/red] {cwd}")
|
||||
raise SystemExit(1)
|
||||
|
||||
cmd: list[str] = [binary]
|
||||
if dangerously_skip_permissions:
|
||||
cmd.append("--dangerously-skip-permissions")
|
||||
cmd: list[str] = [binary, "--dangerously-skip-permissions"]
|
||||
cmd.extend(ctx.args)
|
||||
|
||||
proc = subprocess.run(cmd, cwd=str(chat_cwd), check=False)
|
||||
|
||||
Reference in New Issue
Block a user