From 8433f89bd2f75ba0e2b3f4c9cdace680f8a09e3a Mon Sep 17 00:00:00 2001 From: Freddy Grande Date: Sun, 12 May 2024 22:56:52 +1000 Subject: [PATCH] feat: Adding debug log when host-specific certificate path not found (#2948) --- internal/docker/host.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/docker/host.go b/internal/docker/host.go index 90bbdad7..6103831b 100644 --- a/internal/docker/host.go +++ b/internal/docker/host.go @@ -2,11 +2,12 @@ package docker import ( "fmt" - "log" "net/url" "os" "path/filepath" "strings" + + log "github.com/sirupsen/logrus" ) type Host struct { @@ -49,6 +50,8 @@ func ParseConnection(connection string) (Host, error) { host := remoteUrl.Hostname() if _, err := os.Stat(filepath.Join(basePath, host)); !os.IsNotExist(err) { basePath = filepath.Join(basePath, host) + } else { + log.Debugf("Remote host certificate path does not exist %s, falling back to default: %s", filepath.Join(basePath, host), basePath) } cacertPath := filepath.Join(basePath, "ca.pem")