Output and exit codes: Where output goes

Output and exit codes: Where output goes

Last updated 2026-10-21

The report on stdout, with the exit code reported separately.
The report on stdout, with the exit code reported separately.
  • A report goes to stdout.
  • A refusal, and anything with no report at all, goes to stderr — so redirecting stdout leaves an empty file rather than a file whose contents are the reason there is no report.
  • Under --json, everything is in the one envelope on stdout.
  • A canceled scan that gathered something still has a report, and that goes to stdout like any other.
sqlmc list coverage --list "All Prod" --json > coverage.json
# coverage.json holds the envelope; nothing else is written to it