What happened
Running cfl page create -s <space> -t "<title>" with no -f/--file, no --editor, and no stdin redirected — i.e. forgetting to provide content — does not produce a validation error. Instead, the command silently falls through to \$EDITOR (Vim by default) and opens it on a temp file. In a non-TTY context this produces a screenful of garbled escape codes followed by Error: editor failed: exit status 1.
Reproduction
$ cfl page create -s confluence -t "[Test] no-content"
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal
<ESC[?1049h ... hundreds of escape codes ...>
Vim: Error reading input, exiting...
Vim: Finished.
Error: editor failed: exit status 1
Expected
Either:
- Require an explicit content source (one of
-f, --editor, or piped stdin) and emit a clear validation error like page content cannot be empty: use --file, --editor, or pipe content via stdin; OR
- Suppress the editor fallthrough when stdin is not a TTY.
The same behavior likely affects cfl page edit <id> when no --title, --parent, -f, --editor, or stdin is given.
Discovered during evidence-backed surface inventory; raw capture at /tmp/cfl-outputs-60314/raw/page.create.no-content.txt.
cfl version: 1.0.47 (commit 16e7373)
What happened
Running
cfl page create -s <space> -t "<title>"with no-f/--file, no--editor, and no stdin redirected — i.e. forgetting to provide content — does not produce a validation error. Instead, the command silently falls through to\$EDITOR(Vim by default) and opens it on a temp file. In a non-TTY context this produces a screenful of garbled escape codes followed byError: editor failed: exit status 1.Reproduction
Expected
Either:
-f,--editor, or piped stdin) and emit a clear validation error likepage content cannot be empty: use --file, --editor, or pipe content via stdin; ORThe same behavior likely affects
cfl page edit <id>when no--title,--parent,-f,--editor, or stdin is given.Discovered during evidence-backed surface inventory; raw capture at
/tmp/cfl-outputs-60314/raw/page.create.no-content.txt.cfl version:
1.0.47(commit16e7373)