fix(scripts): reject short flag TUI PTY values

This commit is contained in:
Vincent Koc
2026-06-21 22:52:08 +02:00
parent 179eb15554
commit dfbc9ab246
2 changed files with 9 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ function readOption(args: string[], name: string): string | undefined {
return undefined;
}
const value = args[idx + 1];
if (!value || value.startsWith("--")) {
if (!value || value.startsWith("-")) {
throw new CliArgumentError(`${name} requires a value`);
}
return value.trim();