Skip to content

dotnet --info should indicate invalid global.json #94496

@matkoch

Description

@matkoch

Describe the bug

dotnet --version completes fine even when global.json is malformed JSON.

To Reproduce

Make global.json malformed and execute dotnet --version.

Exceptions (if any)

Should exit with non-zero exit code. Instead:

$ dotnet --version
A JSON parsing exception occurred in [/Users/matt/code/nuke/external/functions/global.json], offset 36 (line 3, column 24): Invalid encoding in string.
6.0.100

$ echo $?
0

Further technical details

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Hostin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions