Skip to content

Commit

Permalink
Add cross-platform path support for proxy certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee committed Dec 1, 2023
1 parent 718503c commit 1527fd9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/infra/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"os"
"path"
"path/filepath"
"strings"
)

const proxyCertPath = "/usr/local/share/ca-certificates/custom-ca-cert.crt"
Expand Down Expand Up @@ -53,7 +52,7 @@ func NewProxy(ctx context.Context, cli *client.Client, params *RunParams, nets *
}
hostCfg.ExtraHosts = append(hostCfg.ExtraHosts, params.ExtraHosts...)
if params.ProxyCertPath != "" {
if !strings.HasPrefix(params.ProxyCertPath, "/") {
if !path.IsAbs(params.ProxyCertPath) {
// needs to be absolute, assume it is relative to the working directory
var dir string
dir, err = os.Getwd()
Expand Down

0 comments on commit 1527fd9

Please sign in to comment.