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

PostAction is not setable on DotNetSettings #3821

Closed
2 tasks done
twenzel opened this issue Feb 21, 2022 · 3 comments · Fixed by #3822
Closed
2 tasks done

PostAction is not setable on DotNetSettings #3821

twenzel opened this issue Feb 21, 2022 · 3 comments · Fixed by #3822
Assignees
Labels
Milestone

Comments

@twenzel
Copy link
Contributor

twenzel commented Feb 21, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake .NET Tool, Cake Frosting, Cake runner for .NET Core

Cake version

2.1

Operating system

Windows

Operating system architecture

64-Bit

CI Server

No response

What are you seeing?

It's not possible to set an Action<IProcess> on the DotNetSettings.
In my use case it's required to the the StandardOutput from the started dotnet tool process.

What is expected?

A new option on DotNetSettings object

Steps to Reproduce

See above

Output log

No response

@augustoproiete
Copy link
Member

Looks like you do need to access the IProcess to get the standard output, otherwise I would suggest a workaround using the HandleExitCode e.g.

DotNetRestore("test.csproj",
    new DotNetRestoreSettings
    {
        HandleExitCode = exitCode =>
        {
            Console.WriteLine($"dotnet restore exit code: {exitCode}");
            return true;
        },
    });

@twenzel
Copy link
Contributor Author

twenzel commented Feb 22, 2022

I've updated the PR so that it's now possible to configure and handle the process.

@cake-build-bot
Copy link

🎉 This issue has been resolved in version v2.2.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants