Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod-shell
Commits
3a36fa325bb4
Commit
3a36fa32
authored
Aug 11, 2021
by
feistel
Browse files
fix: make sure ErrCafileNotFound is returned only when the file doesn't exist
parent
2b4161c1cc98
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/httpclient.go
View file @
3a36fa32
...
...
@@ -84,7 +84,10 @@
}
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment