Add error message when container is exist when nerdctl cp#3275
Closed
yankay wants to merge 1 commit intocontainerd:mainfrom
Closed
Add error message when container is exist when nerdctl cp#3275yankay wants to merge 1 commit intocontainerd:mainfrom
nerdctl cp#3275yankay wants to merge 1 commit intocontainerd:mainfrom
Conversation
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
nerdctl cp
Contributor
|
Hey @yankay :-) So, this makes things better, but will not address the issue: This below (inside a read-only location) nerdctl cp foo:/etc/issue .
/usr/bin/tar: issue: Cannot open: Read-only file system
/usr/bin/tar: Exiting with failure status due to previous errors
FATA[0000] could not find /etc/issue in container foo^ says "could not find /etc/issue in container foo", but this is not true - it was found, but we failed copying it. |
fahedouch
reviewed
Aug 18, 2024
| if foundMatchCount == 0 { | ||
| err = fmt.Errorf("could not find container: %s, with error: %w", options.ContainerReq, err) | ||
| } else { | ||
| err = fmt.Errorf("could not find %s in container %s", options.SrcPath, options.ContainerReq) |
Member
There was a problem hiding this comment.
containerwalker.ContainerWalker is just searching for containers.
// Walk walks containers and calls w.OnFound .
// Req is name, short ID, or long ID.
// Returns the number of the found entries.
Merged
Contributor
Contributor
Author
|
Thanks @apostasie |
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.
Show different error message when the container exists to fix nerdctl cp failure uses confusing error message.
fix: #3197