config: ignore empty config file instead of printing warning#2599
Merged
silvin-lubecki merged 1 commit intodocker:masterfrom Jul 9, 2020
Merged
config: ignore empty config file instead of printing warning#2599silvin-lubecki merged 1 commit intodocker:masterfrom
silvin-lubecki merged 1 commit intodocker:masterfrom
Conversation
Before this change, a warning would be printed if the `~/.docker/config.json`
file was empty:
mkdir -p ~/.docker && touch ~/.docker/config.json
docker pull busybox
WARNING: Error loading config file: /root/.docker/config.json: EOF
Using default tag: latest
....
Given that we also accept an empty "JSON" file (`{}`), it should be
okay to ignore an empty file, as it's effectively a configuration file
with no custom options set.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Codecov Report
@@ Coverage Diff @@
## master #2599 +/- ##
==========================================
- Coverage 58.05% 58.04% -0.01%
==========================================
Files 295 295
Lines 21165 21165
==========================================
- Hits 12288 12286 -2
- Misses 7975 7976 +1
- Partials 902 903 +1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this change, a warning would be printed if the
~/.docker/config.jsonfile was empty:
Given that we also accept an empty "JSON" file (
{}), it should beokay to ignore an empty file, as it's effectively a configuration file
with no custom options set.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)