From 02bc39c063e86455710fdc1834b9bc8b8df6726a Mon Sep 17 00:00:00 2001 From: kuwa2005 Date: Fri, 17 Jul 2026 07:51:59 +0000 Subject: [PATCH] fix(cli): ensure --help output ends with a trailing newline The help/usage text written to stderr by `show()` did not end with a newline, so the shell prompt rendered on the same line as the last option. Append EOL when the output doesn't already end with one. Co-authored-by: Cursor --- packages/opencode/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/index.ts b/packages/opencode/src/index.ts index d97f00be8..afe0f9f31 100644 --- a/packages/opencode/src/index.ts +++ b/packages/opencode/src/index.ts @@ -63,10 +63,10 @@ function show(out: string) { const text = out.trimStart() if (!text.startsWith("mimo ")) { process.stderr.write(UI.logo() + EOL + EOL) - process.stderr.write(text) + process.stderr.write(text.endsWith(EOL) ? text : text + EOL) return } - process.stderr.write(out) + process.stderr.write(out.endsWith(EOL) ? out : out + EOL) } const cli = yargs(args)