diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-20 10:42:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-20 10:42:00 -0400 |
commit | e5e625b2a6481dd49d1d6303df1157c8a51dd7c2 (patch) | |
tree | af3212ad2ddcf805ff2f38a9e63d06e6c7472137 /cmd/podman/system | |
parent | bd711358525b09ebc4cb49094a674700b87f7ec0 (diff) | |
parent | 4e0326241b35d2549fdba5666f343c31279e18e4 (diff) | |
download | podman-e5e625b2a6481dd49d1d6303df1157c8a51dd7c2.tar.gz podman-e5e625b2a6481dd49d1d6303df1157c8a51dd7c2.tar.bz2 podman-e5e625b2a6481dd49d1d6303df1157c8a51dd7c2.zip |
Merge pull request #5872 from jwhonce/wip/options
V2 Fix support for tcp://[::]<port> connections
Diffstat (limited to 'cmd/podman/system')
-rw-r--r-- | cmd/podman/system/service.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go index fa1a33faa..6522a45f8 100644 --- a/cmd/podman/system/service.go +++ b/cmd/podman/system/service.go @@ -57,7 +57,7 @@ func service(cmd *cobra.Command, args []string) error { if err != nil { return err } - logrus.Infof("using API endpoint: \"%s\"", apiURI) + logrus.Infof("using API endpoint: '%s'", apiURI) opts := entities.ServiceOptions{ URI: apiURI, @@ -75,7 +75,6 @@ func service(cmd *cobra.Command, args []string) error { } func resolveApiURI(_url []string) (string, error) { - // When determining _*THE*_ listening endpoint -- // 1) User input wins always // 2) systemd socket activation @@ -83,14 +82,15 @@ func resolveApiURI(_url []string) (string, error) { // 4) if varlink -- adapter.DefaultVarlinkAddress // 5) lastly adapter.DefaultAPIAddress - if _url == nil { + if len(_url) == 0 { if v, found := os.LookupEnv("PODMAN_SOCKET"); found { + logrus.Debugf("PODMAN_SOCKET='%s' used to determine API endpoint", v) _url = []string{v} } } switch { - case len(_url) > 0: + case len(_url) > 0 && _url[0] != "": return _url[0], nil case systemd.SocketActivated(): logrus.Info("using systemd socket activation to determine API endpoint") |