8000 cli/command/context: fix error-handling of skip-tls-verify by thaJeztah · Pull Request #5850 · docker/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cli/command/context: fix error-handling of skip-tls-verify #5850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

thaJeztah
Copy link
Member
@thaJeztah thaJeztah commented Feb 20, 2025

Before 2b9a4d5, this function would use "errors.Wrap" which returns nil if the original error was nil. fmt.Errorf does not do this, so without a nil check, it would unconditionally return an error;

docker context create arm64 --docker host=ssh://172.17.101.26,skip-tls-verify=False

unable to create docker endpoint config: name: %!w(<nil>)

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Fix `docker context create` always returning an error when using the  "skip-tls-verify" option.

- A picture of a cute animal (not mandatory but encouraged)

Before 2b9a4d5, this function
would use "errors.Wrap" which returns nil if the original error
was nil. fmt.Errorf does not do this, so without a nil check,
it would unconditionally return an error;

    docker context create arm64 --docker host=ssh://172.17.101.26,skip-tls-verify=False

    unable to create docker endpoint config: name: %!w(<nil>)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter
Copy link
codecov-commenter commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 58.88%. Comparing base (f9ced58) to head (7e71782).
Report is 18 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5850      +/-   ##
==========================================
+ Coverage   58.81%   58.88%   +0.07%     
==========================================
  Files         349      349              
  Lines       29556    29562       +6     
==========================================
+ Hits        17382    17409      +27     
+ Misses      11189    11171      -18     
+ Partials      985      982       -3     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI raises spurious error on docker context create (CLI v 28)
3 participants
0