Skip to content

Bug report: no error message is thrown if an invalid output is selected #2988

Description

@plamber

Description

During my code validations, I noticed that you can pass any type of output value in the output flag. This shouldn't be possible since we are only supporting three major outputs "JSON, TEXT, CSV".

At first glance, it looks like it falls back to TEXT. If this is the intended behavior, then we should change it in a way to return the new default output which is JSON.

Steps to reproduce

Take any command and use --output yourFakeValue

Expected results

Fallback to JSON and not TEXT or return an exception stating that only JSON, TEXT, and CSV are valid output values.

Actual results

It returns the output in TEXT format

Diagnostics

No response

CLI for Microsoft 365 version

latest CLI

nodejs version

latest node

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions