feat: silence port retrieval stderr
This is completely ignored for the purposes of this port retrieval, so it only makes it looks like Dokku is triggering errors.
This commit is contained in:
1 parent
1c62a055d3
commit
3d7f03611f
1 file changed
+4
-1
@@ -2,6 +2,7 @@ package network
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -129,7 +130,9 @@ func GetContainerPort(appName, procType string, isHerokuishContainer bool, conta
|
|||||||
break
|
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 {
|
if err == nil {
|
||||||
port = strings.Split(string(b[:]), ":")[1]
|
port = strings.Split(string(b[:]), ":")[1]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user