Skip to content

Serverless CLI prints non-JSON output with "--json" if not already installed #13073

@iiroj

Description

@iiroj

Issue description

When running a command outputting JSON like:

serverless info --json --stage=my-arbitrary-stage

The serverless CLI will output non-JSON if not already installed, because the first line logged will be:

✔ Installed Serverless Framework v4.14.1

The full output will be something like:

✔ Installed Serverless Framework v4.14.1
{
  "inputs": {
    "compose": {}
  },
  "info": {
    "functions": [
      {
...

Would it be possible to suppress all other output than the primary JSON, when using --json?

Context

Serverless Framework Version: 4.14.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions