refactor: capture output by default

This is almost certainly the correct default for Dokku. While it's a BC break and might cause an increase in memory usage, the api is mostly internal and therefore this is safe to use.
This commit is contained in:
Jose Diaz-Gonzalez
2024-02-12 20:28:31 -05:00
parent 047a3c00f5
commit 3c6cc68086
27 changed files with 75 additions and 107 deletions

View File

@@ -10,8 +10,8 @@ type PlugnTriggerInput struct {
// Args are the arguments to pass to the trigger
Args []string
// CaptureOutput determines whether to capture the output of the trigger
CaptureOutput bool
// DisableStdioBuffer disables the stdio buffer
DisableStdioBuffer bool
// Env is the environment variables to pass to the trigger
Env map[string]string
@@ -42,13 +42,13 @@ func CallPlugnTriggerWithContext(ctx context.Context, input PlugnTriggerInput) (
args := []string{"trigger", input.Trigger}
args = append(args, input.Args...)
return CallExecCommandWithContext(ctx, ExecCommandInput{
Command: "plugn",
Args: args,
CaptureOutput: input.CaptureOutput,
Env: input.Env,
Stdin: input.Stdin,
StreamStdio: input.StreamStdio,
StreamStdout: input.StreamStdout,
StreamStderr: input.StreamStderr,
Command: "plugn",
Args: args,
DisableStdioBuffer: input.DisableStdioBuffer,
Env: input.Env,
Stdin: input.Stdin,
StreamStdio: input.StreamStdio,
StreamStdout: input.StreamStdout,
StreamStderr: input.StreamStderr,
})
}