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

@@ -31,8 +31,8 @@ type SshCommandInput struct {
// Args are the arguments to pass to the command.
Args []string
// CaptureOutput saves any output from in the TaskResult
CaptureOutput bool
// DisableStdioBuffer disables the stdio buffer
DisableStdioBuffer bool
// Env is a list of environment variables to add to the current environment
Env map[string]string
@@ -137,7 +137,7 @@ func CallSshCommandWithContext(ctx context.Context, input SshCommandInput) (SshR
Command: input.Command,
Args: input.Args,
Env: env,
DisableStdioBuffer: !input.CaptureOutput,
DisableStdioBuffer: input.DisableStdioBuffer,
AllowUknownHosts: input.AllowUknownHosts,
Hostname: u.Hostname(),
Port: uint(port),