Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Output is not valid JSON if outputFormat=Json is requested #254

@jdvor

Description

@jdvor

CLI outputs invalid JSON when outputFormat=Json is requested. This defeats the whole purpose (further processing) of such output format.

Example:
dotnet-octo push --package="Skeleton.App_alpine-x64.1.1.0.tar.gz" --overwrite-mode=FailIfExists --space="Default" --timeout=300 --outputFormat=Json

Output:

Found space: Default (Spaces-1)
{
  "SuccessfulPackages": [],
  "FailedPackages": [
    {
      "Package": "/home/jan/dev/dotnet-daemon/artifacts/Skeleton.App_alpine-x64.1.1.0.tar.gz",
      "Reason": "There was a problem with your request.\n\n - A package with the same ID and version already exists. To proceed anyway, specify an overwriteMode of OverwriteExisting or IgnoreIfExists.\n"
    }
  ]
}

The stdout output is not valid JSON and could not be piped to tools like jq.

dotnet-octo --version
9.1.7

dotnet --info

.NET SDK:
 Version:   7.0.403
 Commit:    142776d834

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         ubuntu.22.04-x64
 Base Path:   /usr/share/dotnet/sdk/7.0.403/

Host:
  Version:      7.0.13
  Architecture: x64
  Commit:       3f73a2f186

.NET SDKs installed:
  6.0.416 [/usr/share/dotnet/sdk]
  7.0.403 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.24 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.13 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.24 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.13 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/share/dotnet/]

global.json file:
  /home/jan/dev/dotnet-daemon/global.json

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions