Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Bug: Pagination message appended to JSON output breaks parsing #31

@rianjs

Description

@rianjs

Description

When using --output json with commands that support pagination (like page list), the pagination message "(showing first N results, use --limit to see more)" is appended after the JSON array, making the output invalid JSON.

Steps to Reproduce

cfl page list -s myspace --limit 3 --output json | jq .

Expected Result

Pure JSON output that can be parsed by jq:

[
  {"id": "123", "status": "current", "title": "Page 1", "version": "v1"},
  {"id": "456", "status": "current", "title": "Page 2", "version": "v1"}
]

Actual Result

[
  {"id": "123", "status": "current", "title": "Page 1", "version": "v1"},
  {"id": "456", "status": "current", "title": "Page 2", "version": "v1"}
]

(showing first 3 results, use --limit to see more)

jq fails to parse with: parse error: Invalid numeric literal

Suggested Fix

The pagination message should:

  1. Not be printed when --output json is used, OR
  2. Be printed to stderr instead of stdout

Environment

  • cfl version: v0.2.0-21-g3fe51c4
  • Found during integration testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions