Forge CLI warnings printed to stdout not compatible with json output

XMLWordPrintable

    • Minor
    • Integration testing

      Issue Summary: 

      Warnings displayed in the CLI (e.g. about node version requirements) are sent to stdout, which means if –-json option is being used, a command may produce non-json output.  

      Steps to Reproduce

      Example:

      1. Use node version that is later than the supported CLI versions and download forge cli (e.g. node 24, cli version 12.13.0)
      2. Run a command with --json option piped to use the json output , e.g. forge install list --json | jq

      Expected Results

      Warning should be visually displayed to stderr, with json output to stdout so it can still be piped (e.g. to jq).

      Actual Results

      $ forge install list --json | jq
      jq: parse error: Invalid numeric literal at line 1, column 8

      Workaround

      No workaround known (other than addressing the cause of the warning).

              Assignee:
              Unassigned
              Reporter:
              Liz Gibbs
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: