fix(cli): restore is_flag=False + flag_value on --cwd option
Reverts an earlier incorrect cleanup: click.option with is_flag=False + flag_value="." is valid click syntax that allows --cwd to work both with and without an argument: --cwd → cwd="." (current directory) --cwd /path → cwd="/path" --cwd=. → cwd="." --cwd --flag → cwd=".", flag=True (correctly parsed) Without these parameters, --cwd requires a value and --dangerously-skip-permissions would be misread as the cwd.
This commit is contained in:
@@ -37,6 +37,8 @@ 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/).",
|
||||||
|
|||||||
Reference in New Issue
Block a user