diff --git a/.changeset/solid-ants-type.md b/.changeset/solid-ants-type.md new file mode 100644 index 0000000..ff7c8f8 --- /dev/null +++ b/.changeset/solid-ants-type.md @@ -0,0 +1,6 @@ +--- +'@e2b/desktop-python': patch +'@e2b/desktop': patch +--- + +Uses minus minus in xdotool call to prevent parsing text as flag diff --git a/packages/js-sdk/src/sandbox.ts b/packages/js-sdk/src/sandbox.ts index 3560252..e663e59 100644 --- a/packages/js-sdk/src/sandbox.ts +++ b/packages/js-sdk/src/sandbox.ts @@ -509,7 +509,9 @@ export class Sandbox extends SandboxBase { for (const chunk of chunks) { await this.commands.run( - `xdotool type --delay ${options.delayInMs} ${this.quoteString(chunk)}` + `xdotool type --delay ${options.delayInMs} -- ${this.quoteString( + chunk + )}` ) } } diff --git a/packages/python-sdk/e2b_desktop/main.py b/packages/python-sdk/e2b_desktop/main.py index 52202c6..c3cabf4 100644 --- a/packages/python-sdk/e2b_desktop/main.py +++ b/packages/python-sdk/e2b_desktop/main.py @@ -543,7 +543,7 @@ def break_into_chunks(text: str, n: int): for chunk in break_into_chunks(text, chunk_size): self.commands.run( - f"xdotool type --delay {delay_in_ms} {quote_string(chunk)}" + f"xdotool type --delay {delay_in_ms} -- {quote_string(chunk)}" ) def press(self, key: Union[str, list[str]]):