mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-12-23 09:19:52 +00:00
add end of command options to sanitize user prompt (#130)
The PR should address the issue where user prompt maybe treated as a option with leading `-` Assuming `claude` does follow POSIX standard, the `--` option should solve the issue. fixes #129
This commit is contained in:
parent
a801a33086
commit
ea7e86714f
1 changed files with 1 additions and 1 deletions
|
|
@ -157,7 +157,7 @@ class SubprocessCLITransport(Transport):
|
|||
cmd.extend(["--input-format", "stream-json"])
|
||||
else:
|
||||
# String mode: use --print with the prompt
|
||||
cmd.extend(["--print", str(self._prompt)])
|
||||
cmd.extend(["--print", "--", str(self._prompt)])
|
||||
|
||||
return cmd
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue