Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI returns 0 (success) exit code even if the action fails #255

Open
jdvor opened this issue Oct 27, 2023 · 0 comments
Open

CLI returns 0 (success) exit code even if the action fails #255

jdvor opened this issue Oct 27, 2023 · 0 comments

Comments

@jdvor
Copy link

jdvor commented Oct 27, 2023

Returning non-zero exit code when the action has failed is the most basic behavior of command line tools which allows them to be composed in scripts, CI pipelines, etc.
Also. the issue is more aggravating because of #254 .

Example:
The package is already uploaded.

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

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"
    }
  ]
}
0

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant