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:
@@ -59,9 +59,8 @@ func attachAppToNetwork(containerID string, networkName string, appName string,
|
||||
// isContainerInNetwork returns true if the container is already attached to the specified network
|
||||
func isContainerInNetwork(containerID string, networkName string) bool {
|
||||
result, err := common.CallExecCommand(common.ExecCommandInput{
|
||||
Command: common.DockerBin(),
|
||||
Args: []string{"container", "inspect", "--format", "{{range $net, $v := .NetworkSettings.Networks}}{{println $net}}{{end}}", containerID},
|
||||
CaptureOutput: true,
|
||||
Command: common.DockerBin(),
|
||||
Args: []string{"container", "inspect", "--format", "{{range $net, $v := .NetworkSettings.Networks}}{{println $net}}{{end}}", containerID},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
@@ -129,9 +128,8 @@ func networkExists(networkName string) (bool, error) {
|
||||
// listNetworks returns a list of docker networks
|
||||
func listNetworks() ([]string, error) {
|
||||
result, err := common.CallExecCommand(common.ExecCommandInput{
|
||||
Command: common.DockerBin(),
|
||||
Args: []string{"network", "ls", "--format", "{{ .Name }}"},
|
||||
CaptureOutput: true,
|
||||
Command: common.DockerBin(),
|
||||
Args: []string{"network", "ls", "--format", "{{ .Name }}"},
|
||||
})
|
||||
if err != nil {
|
||||
common.LogVerboseQuiet(result.StderrContents())
|
||||
|
||||
Reference in New Issue
Block a user