diff --git a/plugins/app-json/src/commands/commands.go b/plugins/app-json/src/commands/commands.go index fc8874a7a..0b643b035 100644 --- a/plugins/app-json/src/commands/commands.go +++ b/plugins/app-json/src/commands/commands.go @@ -36,7 +36,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/apps/src/commands/commands.go b/plugins/apps/src/commands/commands.go index 2d121246a..ab7f3d40b 100644 --- a/plugins/apps/src/commands/commands.go +++ b/plugins/apps/src/commands/commands.go @@ -53,7 +53,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/builder/src/commands/commands.go b/plugins/builder/src/commands/commands.go index a4b0549dc..3d1c5a91a 100644 --- a/plugins/builder/src/commands/commands.go +++ b/plugins/builder/src/commands/commands.go @@ -36,7 +36,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/buildpacks/src/commands/commands.go b/plugins/buildpacks/src/commands/commands.go index d29b6e566..86217f9e5 100644 --- a/plugins/buildpacks/src/commands/commands.go +++ b/plugins/buildpacks/src/commands/commands.go @@ -41,7 +41,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/common/docker.go b/plugins/common/docker.go index fdc28022b..14916cfbe 100644 --- a/plugins/common/docker.go +++ b/plugins/common/docker.go @@ -21,10 +21,9 @@ func ContainerIsRunning(containerID string) bool { // ContainerRemove runs 'docker container remove' against an existing container func ContainerRemove(containerID string) bool { result, err := CallExecCommand(ExecCommandInput{ - Command: DockerBin(), - Args: []string{"container", "remove", "-f", containerID}, - CaptureOutput: false, - StreamStdio: false, + Command: DockerBin(), + Args: []string{"container", "remove", "-f", containerID}, + StreamStderr: true, }) if err != nil { return false @@ -35,10 +34,8 @@ func ContainerRemove(containerID string) bool { // ContainerExists checks to see if a container exists func ContainerExists(containerID string) bool { result, err := CallExecCommand(ExecCommandInput{ - Command: DockerBin(), - Args: []string{"container", "inspect", containerID}, - CaptureOutput: false, - StreamStdio: false, + Command: DockerBin(), + Args: []string{"container", "inspect", containerID}, }) if err != nil { return false @@ -138,7 +135,6 @@ func CopyFromImage(appName string, image string, source string, destination stri Command: "tail", Args: []string{"-c1", destination}, CaptureOutput: true, - StreamStdio: false, }) if err != nil || result.ExitCode != 0 { return fmt.Errorf("Unable to append trailing newline to copied file: %v", result.Stderr) @@ -250,7 +246,6 @@ func DockerInspect(containerOrImageID, format string) (output string, err error) Command: DockerBin(), Args: []string{"inspect", "--format", format, containerOrImageID}, CaptureOutput: true, - StreamStdio: false, }) if err != nil { return "", err diff --git a/plugins/config/src/commands/commands.go b/plugins/config/src/commands/commands.go index 53bc00db8..34a37ffd5 100644 --- a/plugins/config/src/commands/commands.go +++ b/plugins/config/src/commands/commands.go @@ -57,7 +57,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/cron/src/commands/commands.go b/plugins/cron/src/commands/commands.go index c648c35b4..9125a9384 100644 --- a/plugins/cron/src/commands/commands.go +++ b/plugins/cron/src/commands/commands.go @@ -37,7 +37,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/logs/src/commands/commands.go b/plugins/logs/src/commands/commands.go index afa4f93f3..5da6bddbd 100644 --- a/plugins/logs/src/commands/commands.go +++ b/plugins/logs/src/commands/commands.go @@ -63,7 +63,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/logs/triggers.go b/plugins/logs/triggers.go index af8c32ca2..1a2084e54 100644 --- a/plugins/logs/triggers.go +++ b/plugins/logs/triggers.go @@ -49,7 +49,6 @@ func TriggerDockerArgsProcessDeploy(appName string) error { Command: common.DockerBin(), Args: []string{"system", "info", "--format", "{{ .LoggingDriver }}"}, CaptureOutput: true, - StreamStdio: false, }) if !allowedDrivers[result.StdoutContents()] { diff --git a/plugins/network/functions.go b/plugins/network/functions.go index 447ecdaaf..fa8abaec5 100644 --- a/plugins/network/functions.go +++ b/plugins/network/functions.go @@ -62,7 +62,6 @@ func isContainerInNetwork(containerID string, networkName string) bool { Command: common.DockerBin(), Args: []string{"container", "inspect", "--format", "{{range $net, $v := .NetworkSettings.Networks}}{{println $net}}{{end}}", containerID}, CaptureOutput: true, - StreamStdio: false, }) if err != nil { @@ -133,7 +132,6 @@ func listNetworks() ([]string, error) { Command: common.DockerBin(), Args: []string{"network", "ls", "--format", "{{ .Name }}"}, CaptureOutput: true, - StreamStdio: false, }) if err != nil { common.LogVerboseQuiet(result.StderrContents()) diff --git a/plugins/network/src/commands/commands.go b/plugins/network/src/commands/commands.go index 66c285698..f44f4e378 100644 --- a/plugins/network/src/commands/commands.go +++ b/plugins/network/src/commands/commands.go @@ -43,7 +43,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/ports/src/commands/commands.go b/plugins/ports/src/commands/commands.go index 68c7460e4..82a22d1e9 100644 --- a/plugins/ports/src/commands/commands.go +++ b/plugins/ports/src/commands/commands.go @@ -40,7 +40,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/proxy/src/commands/commands.go b/plugins/proxy/src/commands/commands.go index 93ffc4f62..fd9f0bb8e 100644 --- a/plugins/proxy/src/commands/commands.go +++ b/plugins/proxy/src/commands/commands.go @@ -40,7 +40,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/ps/src/commands/commands.go b/plugins/ps/src/commands/commands.go index 9f73c76d8..a0e1f4f15 100644 --- a/plugins/ps/src/commands/commands.go +++ b/plugins/ps/src/commands/commands.go @@ -43,7 +43,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/ps/triggers.go b/plugins/ps/triggers.go index 5841415ec..50d57f554 100644 --- a/plugins/ps/triggers.go +++ b/plugins/ps/triggers.go @@ -106,7 +106,6 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error { Command: "procfile-util", Args: []string{"check", "-P", processSpecificProcfile}, CaptureOutput: true, - StreamStdio: false, }) if err != nil { return fmt.Errorf(result.StderrContents()) diff --git a/plugins/registry/functions.go b/plugins/registry/functions.go index 053713e8b..d965486ee 100644 --- a/plugins/registry/functions.go +++ b/plugins/registry/functions.go @@ -124,20 +124,18 @@ func pushToRegistry(appName string, tag int, imageID string, imageRepo string) e func dockerTag(imageID string, imageTag string) bool { result, err := common.CallExecCommand(common.ExecCommandInput{ - Command: common.DockerBin(), - Args: []string{"image", "tag", imageID, imageTag}, - CaptureOutput: false, - StreamStdio: true, + Command: common.DockerBin(), + Args: []string{"image", "tag", imageID, imageTag}, + StreamStdio: true, }) return err == nil && result.ExitCode == 0 } func dockerPush(imageTag string) bool { result, err := common.CallExecCommand(common.ExecCommandInput{ - Command: common.DockerBin(), - Args: []string{"image", "push", imageTag}, - CaptureOutput: false, - StreamStdio: true, + Command: common.DockerBin(), + Args: []string{"image", "push", imageTag}, + StreamStdio: true, }) return err == nil && result.ExitCode == 0 } diff --git a/plugins/registry/src/commands/commands.go b/plugins/registry/src/commands/commands.go index 6b7ac8709..6dd19cd19 100644 --- a/plugins/registry/src/commands/commands.go +++ b/plugins/registry/src/commands/commands.go @@ -37,7 +37,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/registry/subcommands.go b/plugins/registry/subcommands.go index 2a5c58296..34cf076f6 100644 --- a/plugins/registry/subcommands.go +++ b/plugins/registry/subcommands.go @@ -54,10 +54,9 @@ func CommandLogin(server string, username string, password string, passwordStdin } _, err := common.CallPlugnTrigger(common.PlugnTriggerInput{ - Trigger: "post-registry-login", - Args: []string{server, username}, - StreamStdio: true, - CaptureOutput: false, + Trigger: "post-registry-login", + Args: []string{server, username}, + StreamStdio: true, Env: map[string]string{ "DOCKER_REGISTRY_PASS": password, }, diff --git a/plugins/repo/src/commands/commands.go b/plugins/repo/src/commands/commands.go index 2fb6b5ac6..80b83357b 100644 --- a/plugins/repo/src/commands/commands.go +++ b/plugins/repo/src/commands/commands.go @@ -36,7 +36,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/resource/src/commands/commands.go b/plugins/resource/src/commands/commands.go index 801cd1d04..d79c4c539 100644 --- a/plugins/resource/src/commands/commands.go +++ b/plugins/resource/src/commands/commands.go @@ -39,7 +39,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/scheduler-k3s/functions.go b/plugins/scheduler-k3s/functions.go index 90b6e617e..959bc2aa5 100644 --- a/plugins/scheduler-k3s/functions.go +++ b/plugins/scheduler-k3s/functions.go @@ -338,7 +338,6 @@ func extractStartCommand(input StartCommandInput) string { Trigger: "config-get", Args: []string{input.AppName, "DOKKU_START_CMD"}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && resp.ExitCode == 0 && len(resp.Stdout) > 0 { command = strings.TrimSpace(resp.Stdout) @@ -349,7 +348,6 @@ func extractStartCommand(input StartCommandInput) string { Trigger: "config-get", Args: []string{input.AppName, "DOKKU_DOCKERFILE_START_CMD"}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && resp.ExitCode == 0 && len(resp.Stdout) > 0 { command = strings.TrimSpace(resp.Stdout) diff --git a/plugins/scheduler-k3s/src/commands/commands.go b/plugins/scheduler-k3s/src/commands/commands.go index e94890d76..58e927414 100644 --- a/plugins/scheduler-k3s/src/commands/commands.go +++ b/plugins/scheduler-k3s/src/commands/commands.go @@ -46,7 +46,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent) diff --git a/plugins/scheduler-k3s/triggers.go b/plugins/scheduler-k3s/triggers.go index 3ff7a52ab..68dc7d447 100644 --- a/plugins/scheduler-k3s/triggers.go +++ b/plugins/scheduler-k3s/triggers.go @@ -531,20 +531,18 @@ func TriggerSchedulerDeploy(scheduler string, appName string, imageTag string) e common.LogInfo1("Running post-deploy") _, err = common.CallPlugnTrigger(common.PlugnTriggerInput{ - Args: []string{appName, "", "", imageTag}, - CaptureOutput: false, - StreamStdio: true, - Trigger: "core-post-deploy", + Args: []string{appName, "", "", imageTag}, + StreamStdio: true, + Trigger: "core-post-deploy", }) if err != nil { return fmt.Errorf("Error running core-post-deploy: %w", err) } _, err = common.CallPlugnTrigger(common.PlugnTriggerInput{ - Args: []string{appName, "", "", imageTag}, - CaptureOutput: false, - StreamStdio: true, - Trigger: "post-deploy", + Args: []string{appName, "", "", imageTag}, + StreamStdio: true, + Trigger: "post-deploy", }) if err != nil { return fmt.Errorf("Error running post-deploy: %w", err) @@ -806,14 +804,12 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args [] Trigger: "config-get", Args: []string{appName, "DOKKU_RM_CONTAINER"}, CaptureOutput: true, - StreamStdio: false, }) if err != nil { resp, err := common.CallPlugnTrigger(common.PlugnTriggerInput{ Trigger: "config-get-global", Args: []string{"DOKKU_RM_CONTAINER"}, CaptureOutput: true, - StreamStdio: false, }) if err == nil { dokkuRmContainer = strings.TrimSpace(resp.Stdout) @@ -865,7 +861,6 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args [] Trigger: "procfile-get-command", Args: []string{appName, args[0], "5000"}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && resp.Stdout != "" { common.LogInfo1Quiet(fmt.Sprintf("Found '%s' in Procfile, running that command", args[0])) diff --git a/plugins/scheduler/src/commands/commands.go b/plugins/scheduler/src/commands/commands.go index 4cde898ef..645326b97 100644 --- a/plugins/scheduler/src/commands/commands.go +++ b/plugins/scheduler/src/commands/commands.go @@ -36,7 +36,6 @@ func main() { Command: "ps", Args: []string{"-o", "command=", strconv.Itoa(os.Getppid())}, CaptureOutput: true, - StreamStdio: false, }) if err == nil && strings.Contains(result.StdoutContents(), "--all") { fmt.Println(helpContent)