Jericho

Results 173 comments of Jericho

As I have mentioned, my unit test fails ([here](https://github.com/cake-build/cake/actions/runs/3641345756/jobs/6147169638#step:5:601)): ``` [xUnit.net 00:00:06.59] Cake.Common.Tests.Unit.Tools.Command.CommandRunnerTests.Exception_Thrown_when_command_exit_code_is_zero_and_expected_value_is_non_zero [FAIL] Failed Cake.Common.Tests.Unit.Tools.Command.CommandRunnerTests.Exception_Thrown_when_command_exit_code_is_zero_and_expected_value_is_non_zero [157 ms] Error Message: Assert.IsType() Failure Expected: Cake.Core.CakeException Actual: (null) Stack Trace: at Cake.Common.Tests.Unit.Tools.Command.CommandRunnerTests.Exception_Thrown_when_command_exit_code_is_zero_and_expected_value_is_non_zero()...

@devlead to reproduce the problem I outline you must meet two conditions: 1. The executable must return zero 2. You must specify a non-zero expected exit code in your Cake...

@devlead Here's unit test to demonstrate the problem ```chsarp [Fact] // This unit test demonstrates the problem reported in GH-4013. // The command's exit code is zero and the expected...

> The issue is that exit code is marked as handled if `exitCode == expectExitCode` This is exactly the problem. In the scenario I'm presenting, the exit code is zero...

Look at the `ProcessExitCode` method in Cake.Core/Tooling/Tool.cs. The logic to throw an exception when exit code does not match expected value is there. The issue is that zero is hard...

If the executable returns a value like '999' for example and the expected exit code is '1234', Cake will throw an exception because they don't match. Why would Cake not...

> Yes but it's only processed if HandleExitCode returns false. Correct. And currently HandleExitCode does indeed return false because zero is not equal to '1234'. But this is completely overridden...

My suggestion is to replace [this code](https://github.com/cake-build/cake/blob/develop/src/Cake.Core/Tooling/Tool.cs#L101-L103): ```csharp if (!settings.HandleExitCode?.Invoke(exitCode) ?? true) { ProcessExitCode(process.GetExitCode()); } ``` with something like this: ```csharp if (!settings.HandleExitCode?.Invoke(exitCode) ?? true) { const string message =...

I have the exact same scenario: The 3rd-party system I connect to mandates that I include a token on the querystring and this token expires at regular intervals. Therefore, I...

The are also several model classes and resource classes to be marked as obsolete: - StrongGrid.Models.Legacy - Campaign - CampaignStatus - Contact - CustomFieldMetadata - Field - FieldMetadata - ImportResult...