Skip to content

once list ANSI output breaks programmatic parsing in CI #48

@amiorin

Description

@amiorin

Problem

once list always emits ANSI escape sequences even when stdout is not a terminal.

Raw output:

\e]8;;https://foo.bigconfig.space\e\\[94mfoo.bigconfig.space[m\e]8;;\e\\ (running)

There is no --no-color, --plain, or --output json flag to suppress this.

Impact

Any script, CI job, or Ansible module that needs to parse once list must first strip ANSI codes with a brittle regex before it can extract hostnames or statuses.This is fragile — it breaks if the output format changes or if a hostname does not match the assumed domain pattern.

Expected behaviour

At minimum, once should honour the NO_COLOR convention so that setting NO_COLOR=1 (or detecting a non-TTY stdout) suppresses all ANSI codes.

A --output json flag on once list would be even better:

[
  {"host": "foo.bigconfig.space", "status": "running"},
  {"host": "bar.bigconfig.space", "status": "running"}
]

Steps to reproduce

once list > output.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions