Skip to content
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

fix: fix the lookup check for registry-config option #505

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

lizMSFT
Copy link
Contributor

@lizMSFT lizMSFT commented Aug 18, 2022

This bug was introduced in PR #432.
fs.Lookup("config") != nil was intended to check whether there was an existing config to avoid repeatedly setting the config value. However, we are not able to set the config value if fs.Lookup("config") returns nil.
This PR changed the check to if fs.Lookup("config") == nil {}

Signed-off-by: Zoey Li zoeyli@microsoft.com

Signed-off-by: Zoey Li <zoeyli@microsoft.com>
@codecov-commenter
Copy link

Codecov Report

Merging #505 (6b78aad) into main (a4da0a3) will increase coverage by 0.77%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #505      +/-   ##
==========================================
+ Coverage   71.90%   72.68%   +0.77%     
==========================================
  Files           9        9              
  Lines         388      388              
==========================================
+ Hits          279      282       +3     
+ Misses         87       85       -2     
+ Partials       22       21       -1     
Impacted Files Coverage Δ
cmd/oras/internal/option/remote.go 61.90% <100.00%> (+2.85%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit 15a9eb9 into oras-project:main Aug 18, 2022
TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants