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:
@@ -38,8 +38,7 @@ const vectorOldContainerName = "vector"
|
||||
|
||||
func getComposeFile() ([]byte, error) {
|
||||
result, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "vector-template-source",
|
||||
CaptureOutput: true,
|
||||
Trigger: "vector-template-source",
|
||||
})
|
||||
if err == nil && result.ExitCode == 0 && strings.TrimSpace(result.Stdout) != "" {
|
||||
contents, err := os.ReadFile(strings.TrimSpace(result.Stdout))
|
||||
|
||||
@@ -60,9 +60,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)
|
||||
|
||||
@@ -46,9 +46,8 @@ func TriggerDockerArgsProcessDeploy(appName string) error {
|
||||
|
||||
if !hasDriverOpt {
|
||||
result, _ := common.CallExecCommand(common.ExecCommandInput{
|
||||
Command: common.DockerBin(),
|
||||
Args: []string{"system", "info", "--format", "{{ .LoggingDriver }}"},
|
||||
CaptureOutput: true,
|
||||
Command: common.DockerBin(),
|
||||
Args: []string{"system", "info", "--format", "{{ .LoggingDriver }}"},
|
||||
})
|
||||
|
||||
if !allowedDrivers[result.StdoutContents()] {
|
||||
|
||||
Reference in New Issue
Block a user