Skip to content

Commit

Permalink
feat: Adding debug log when host-specific certificate path not found (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fredskis committed May 12, 2024
1 parent bc1a5fb commit 8433f89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/docker/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package docker

import (
"fmt"
"log"
"net/url"
"os"
"path/filepath"
"strings"

log "github.com/sirupsen/logrus"
)

type Host struct {
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 8433f89

Please sign in to comment.