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

@@ -37,9 +37,8 @@ func main() {
usage()
case "help":
result, err := common.CallExecCommand(common.ExecCommandInput{
Command: "ps",
Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())},
CaptureOutput: true,
Command: "ps",
Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())},
})
if err == nil && strings.Contains(result.StdoutContents(), "--all") {
fmt.Println(helpContent)