-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Easier Way to Read Process Output? #3947
Comments
🎉 This issue has been resolved in version v2.3.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
@devlead Thanks for this improvement. I'm in the process of removing I came up with the following solution, but it feels very verbose to be forced to specify the tool name, tool executable names and tool path: Command(
new CommandSettings
{
ToolName = appName,
ToolExecutableNames = new[] { appName, $"{appName}.exe" },
ToolPath = $"{publishDir}{appName}.exe",
},
new ProcessArgumentBuilder()
.Append("nopause")
); I tried specifying It would be great to be able to only specify the Command(
new FilePath($"{publishDir}{appName}.exe"),
new ProcessArgumentBuilder()
.Append("nopause")
); |
@Jericho If ToolPath specified we should be able to use it. So that could be a potential improvement. For now you should, instead of specifying ToolPath be able to register your exes fullpath with Cake tools resolution, that way tool resolution will find it. Context.Tools.RegisterFile("C:/ProgramData/chocolatey/bin/NuGet.exe") https://cakebuild.net/docs/writing-builds/tools/tool-resolution |
That would indeed be the best option (in my humble opinion!). |
Discussed in https://github.com/orgs/cake-build/discussions/3837
Originally posted by RehanSaeed March 10, 2022
I'm executing a process and reading the output like so:
This is pretty cumbersome. I'd really like something far simpler like simple-exec built into Cake build aliases so I don't have to include yet another dependency:
I don't believe anything like this currently exists unless there is an alias I'm missing?
The text was updated successfully, but these errors were encountered: