summaryrefslogtreecommitdiff
path: root/client/httpclient.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/httpclient.go')
-rw-r--r--client/httpclient.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/httpclient.go b/client/httpclient.go
index 15bae25..fceb0f4 100644
--- a/client/httpclient.go
+++ b/client/httpclient.go
@@ -84,7 +84,10 @@ func NewHTTPClientWithOpts(gitlabURL, gitlabRelativeURLRoot, caFile, caPath stri
}
if _, err := os.Stat(caFile); err != nil {
- return nil, fmt.Errorf("cannot find cafile '%s': %w", caFile, ErrCafileNotFound)
+ if os.IsNotExist(err) {
+ return nil, fmt.Errorf("cannot find cafile '%s': %w", caFile, ErrCafileNotFound)
+ }
+ return nil, err
}
transport, host, err = buildHttpsTransport(*hcc, selfSignedCert, gitlabURL)