chore: remove all direct usage of go-sh outside of plugin trigger setup
The new way is to use CallExecCommand instead.
This commit is contained in:
1 parent
688ee518af
commit
8a940c6e47
11 files changed
+99
-99
No files matched your search
@@ -10,8 +10,6 @@ import (
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
dockeroptions "github.com/dokku/dokku/plugins/docker-options"
|
||||
|
||||
sh "github.com/codeskyblue/go-sh"
|
||||
)
|
||||
|
||||
// TriggerDockerArgsProcessDeploy outputs the logs plugin docker options for an app
|
||||
@@ -47,9 +45,14 @@ func TriggerDockerArgsProcessDeploy(appName string) error {
|
||||
}
|
||||
|
||||
if !hasDriverOpt {
|
||||
b, _ := sh.Command(common.DockerBin(), "system", "info", "--format", "{{ .LoggingDriver }}").Output()
|
||||
output := strings.TrimSpace(string(b[:]))
|
||||
if !allowedDrivers[output] {
|
||||
result, _ := common.CallExecCommand(common.ExecCommandInput{
|
||||
Command: common.DockerBin(),
|
||||
Args: []string{"system", "info", "--format", "{{ .LoggingDriver }}"},
|
||||
CaptureOutput: true,
|
||||
StreamStdio: false,
|
||||
})
|
||||
|
||||
if !allowedDrivers[result.StdoutContents()] {
|
||||
ignoreMaxSize = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user