cake-build / cake-build/cake

[Cake.Frosting] has exit code -1 for any kind of error

Open
#3,830 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.2k
Forks
778
Avg merge
3h 37m
Merged PRs (30d)
21

Description

### Prerequisites

- [X] I have written a descriptive issue title
- [X] I have searched [issues](https://github.com/cake-build/cake/issues) to ensure it has not already been reported

### Cake runner

Cake Frosting, Cake runner for .NET Core

### Cake version

2.0.0

### Operating system

Linux, Windows

### Operating system architecture

64-Bit

### CI Server

gitlab

### What are you seeing?

exit code is -1

### What is expected?

exit code is > 0 for errors

### Steps to Reproduce

simple frosting project
```
public static class Program
{
class MyCtx : FrostingContext
{
public MyCtx(ICakeContext context) : base(context)
{
}
}
public static int Main(string[] args)
{
return new CakeHost()
.UseContext()
.Run(args);
}
}
```

- call with `dotnet run -- --target foobar`
- exit code is -1

### Output log

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with a simple Cake Frosting project using `dotnet run -- --target foobar`, then trace the `CakeHost.Run` entry point and how it converts errors into a process exit code. Done means an invalid target or other error returns a positive exit code on Linux and Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.