go-execute
go-execute copied to clipboard
Automate CLI commands with Go
## Description It's not true that bash resolves to `/bin/bash` for all systems and avoids ugly patches such as [1]. Also, fix the tests for systems where ls does not...
Signed-off-by: Alex Ellis (OpenFaaS Ltd) ## Description WIP: Implement cancellation via context Execute allows a user to pass in a context with a timeout, or a cancellation that can be...
It would be great if we could define a way to manipulate stdout/stderr as it is being streamed. ## Expected Behaviour I would like to do something like the following:...
The `cmd` object is not exposed in any way, so there is no way to call `cmd.Process.Kill()` out of band if the parent process exits early. ## Expected Behaviour I...
If there is a problem in the execution process and the command execution has been blocked, is there any way to solve this problem? For example, setting the timeout period,...
## Description This is tracked as part of the ExecResult as it might otherwise be shadowed by ctx.Err(). I was seeing the following error that was otherwise swallowed by the...
## Expected Behaviour I would expect us to do _something_ with `execErr` [here](https://github.com/alexellis/go-execute/blob/master/exec.go#L180-L185) unless it can truly be ignored, but its not clear if it can be. ## Current Behaviour...
How can I do the equivalent of `$ FOO='BAR' bash -c 'echo $FOO'` ? ``` cmd := execute.ExecTask{ Command: "echo", Args: []string{"$FOO"}, StreamStdio: false, } ```