fix: preserve tran script command separator

This commit is contained in:
Codex
2026-05-25 15:32:56 +00:00
parent 073213c302
commit 964cc7e984
5 changed files with 41 additions and 7 deletions
+6 -2
View File
@@ -161,8 +161,12 @@ export function extractRemoteCliOptions(argv: string[]): RemoteCliOptions {
for (let index = 0; index < argv.length; index += 1) {
const arg = argv[index] ?? "";
if (arg === "--") {
rest.push(...argv.slice(index + 1));
break;
if (rest.length === 0) {
rest.push(...argv.slice(index + 1));
break;
}
rest.push(arg);
continue;
}
if (hostOptions.has(arg)) {
options.host = requiredValue(argv, index, arg);