Change error message for unreadable files#1053
Merged
thaJeztah merged 1 commit intodocker:masterfrom May 21, 2018
justyntemme:patch-3
Merged
Change error message for unreadable files#1053thaJeztah merged 1 commit intodocker:masterfrom justyntemme:patch-3
thaJeztah merged 1 commit intodocker:masterfrom
justyntemme:patch-3
Conversation
cpuguy83
reviewed
May 11, 2018
cli/command/image/build/context.go
Outdated
| if err != nil { | ||
| if os.IsPermission(err) { | ||
| return errors.Errorf("can't stat '%s'", filePath) | ||
| return errors.Errorf("can't stat: file not found or excluded by .dockerignore '%s'", filePath) |
Collaborator
There was a problem hiding this comment.
This doesn't seem right. This is a permission error, not a not found error.
In addition, we should just wrap the real error errors.Wrap(err, "error reading file"). Generally the file name should already be in the error.
Fix for docker/for-linux#44 Signed-off-by: Justyn Temme <justyntemme@gmail.com>
Contributor
Author
|
I have updated the PR to the correct error which should be |
vieux
approved these changes
May 21, 2018
Contributor
vieux
left a comment
There was a problem hiding this comment.
LGTM ping @thaJeztah @vdemeester
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.
Fix for docker/for-linux#44
- What I did
Change the error message for unreadable files to mention the possibility of a .Dockerignore entry for multi developer teams.
- How I did it
Simply changing the text in the error message
- How to verify it
Run docker and try to COPY a file with a .Dockerignore entry
- Description for the changelog
Changed error message for unreadable files to clarify possibility of a .Dockerignore entry
- A picture of a cute animal (not mandatory but encouraged)