From e332d0e5d7bebeef88ef14362812cfa70a7b2ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 26 May 2016 22:15:28 +0200 Subject: [PATCH 1/2] Fix a typo --- signature/policy_config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signature/policy_config.go b/signature/policy_config.go index f4af51d4..fd634783 100644 --- a/signature/policy_config.go +++ b/signature/policy_config.go @@ -363,7 +363,7 @@ func (kt *sbKeyType) UnmarshalJSON(data []byte) error { // newPRSignedBaseLayer is NewPRSignedBaseLayer, except it returns the private type. func newPRSignedBaseLayer(baseLayerIdentity PolicyReferenceMatch) (*prSignedBaseLayer, error) { if baseLayerIdentity == nil { - return nil, InvalidPolicyFormatError("baseLayerIdenitty not specified") + return nil, InvalidPolicyFormatError("baseLayerIdentity not specified") } return &prSignedBaseLayer{ prCommon: prCommon{Type: prTypeSignedBaseLayer}, From 429a4b0aec0eb6963e91fa6da8683e4d6c49c0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Tue, 31 May 2016 01:37:05 +0200 Subject: [PATCH 2/2] Do not drop the underlying error message when a Docker reference is invalid --- reference/reference.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/reference.go b/reference/reference.go index 3c0a80d0..cd768f19 100644 --- a/reference/reference.go +++ b/reference/reference.go @@ -55,7 +55,7 @@ type Canonical interface { func ParseNamed(s string) (Named, error) { named, err := distreference.ParseNamed(s) if err != nil { - return nil, fmt.Errorf("Error parsing reference: %q is not a valid repository/tag", s) + return nil, fmt.Errorf("Error parsing reference: %q is not a valid repository/tag: %s", s, err.Error()) } r, err := WithName(named.Name()) if err != nil {