mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
Merge pull request #3088 from dokku/silence-port-output
Silence port retrieval stderr
This commit is contained in:
@@ -2,6 +2,7 @@ package network
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -129,7 +130,9 @@ func GetContainerPort(appName, procType string, isHerokuishContainer bool, conta
|
||||
break
|
||||
}
|
||||
}
|
||||
b, err := sh.Command("docker", "port", containerID, port).Output()
|
||||
cmd := sh.Command("docker", "port", containerID, port)
|
||||
cmd.Stderr = ioutil.Discard
|
||||
b, err := cmd.Output()
|
||||
if err == nil {
|
||||
port = strings.Split(string(b[:]), ":")[1]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user