This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Returns an error if the condition is not met#97
Closed
zhouhao3 wants to merge 1 commit intoopencontainers:masterfrom
Closed
Returns an error if the condition is not met#97zhouhao3 wants to merge 1 commit intoopencontainers:masterfrom
zhouhao3 wants to merge 1 commit intoopencontainers:masterfrom
Conversation
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
Contributor
|
On Thu, Dec 08, 2016 at 10:34:33PM -0800, Zhou Hao wrote:
When some of the conditions do not meet, you can not only return
nil, but also return an error message to terminate the program.
This PR is very similar to #83, and I recommend closing this as well
(although there's still room for improving the UI [1]). Having no
references is *not* an error. It is surprising, hence the warning,
but an image without refs is technically legal and has some legitimate
use cases. More background in opencontainers/image-spec#459,
opencontainers/image-spec#287, and the #83 discussion.
On the other hand, finding a subdirectory under `refs/` *may* be an
error. The current spec wording has a few instances of “the refs
subdirectories”, including the charset restriction [2]. But my guess
is that the intention was to restrict refs to a single directory. I'm
not sure if the intention for refs/somedir/ was to ignore it or error
out though. An image-spec PR to clarify this point is probably in
order.
[1]: #83 (comment)
[2]: https://github.com/opencontainers/image-spec/blob/v1.0.0-rc3/image-layout.md
|
Author
|
Well, it really should not be so modified here, but I always feel that this place to determine some problems. |
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When some of the conditions do not meet, you can not only return nil, but also return an error message to terminate the program.
Signed-off-by: zhouhao zhouhao@cn.fujitsu.com