refactor: use CallPlugnTrigger instead of PlugnTriggerOutput

Refs #6422
This commit is contained in:
Jose Diaz-Gonzalez
2024-03-14 01:18:28 -04:00
parent a9933c7f02
commit cdff4ae867
15 changed files with 149 additions and 58 deletions

View File

@@ -77,6 +77,16 @@ func (ecr ExecCommandResponse) StderrContents() string {
return strings.TrimSpace(ecr.Stderr)
}
// StderrBytes returns the trimmed stderr of the command as bytes
func (ecr ExecCommandResponse) StderrBytes() []byte {
return []byte(ecr.StderrContents())
}
// StdoutBytes returns the trimmed stdout of the command as bytes
func (ecr ExecCommandResponse) StdoutBytes() []byte {
return []byte(ecr.StdoutContents())
}
// CallExecCommand executes a command on the local host
func CallExecCommand(input ExecCommandInput) (ExecCommandResponse, error) {
ctx := context.Background()