mirror of https://github.com/containers/podman.git
sign: make all error messages lowercase
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
23633f4619
commit
4e234136bc
|
@ -59,7 +59,7 @@ func signCmd(c *cli.Context) error {
|
||||||
|
|
||||||
signby := c.String("sign-by")
|
signby := c.String("sign-by")
|
||||||
if signby == "" {
|
if signby == "" {
|
||||||
return errors.Errorf("You must provide an identity")
|
return errors.Errorf("please provide an identity")
|
||||||
}
|
}
|
||||||
|
|
||||||
var sigStoreDir string
|
var sigStoreDir string
|
||||||
|
@ -72,11 +72,11 @@ func signCmd(c *cli.Context) error {
|
||||||
|
|
||||||
mech, err := signature.NewGPGSigningMechanism()
|
mech, err := signature.NewGPGSigningMechanism()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Error initializing GPG")
|
return errors.Wrap(err, "error initializing GPG")
|
||||||
}
|
}
|
||||||
defer mech.Close()
|
defer mech.Close()
|
||||||
if err := mech.SupportsSigning(); err != nil {
|
if err := mech.SupportsSigning(); err != nil {
|
||||||
return errors.Wrap(err, "Signing is not supported")
|
return errors.Wrap(err, "signing is not supported")
|
||||||
}
|
}
|
||||||
|
|
||||||
systemRegistriesDirPath := trust.RegistriesDirPath(runtime.SystemContext())
|
systemRegistriesDirPath := trust.RegistriesDirPath(runtime.SystemContext())
|
||||||
|
@ -100,7 +100,7 @@ func signCmd(c *cli.Context) error {
|
||||||
}
|
}
|
||||||
dockerReference := rawSource.Reference().DockerReference()
|
dockerReference := rawSource.Reference().DockerReference()
|
||||||
if dockerReference == nil {
|
if dockerReference == nil {
|
||||||
return errors.Errorf("Cannot determine canonical Docker reference for destination %s", transports.ImageName(rawSource.Reference()))
|
return errors.Errorf("cannot determine canonical Docker reference for destination %s", transports.ImageName(rawSource.Reference()))
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the signstore file
|
// create the signstore file
|
||||||
|
@ -190,7 +190,7 @@ func isValidSigStoreDir(sigStoreDir string) (string, error) {
|
||||||
}
|
}
|
||||||
_, exists := writeURIs[url.Scheme]
|
_, exists := writeURIs[url.Scheme]
|
||||||
if !exists {
|
if !exists {
|
||||||
return sigStoreDir, errors.Errorf("Writing to %s is not supported. Use a supported scheme", sigStoreDir)
|
return sigStoreDir, errors.Errorf("writing to %s is not supported. Use a supported scheme", sigStoreDir)
|
||||||
}
|
}
|
||||||
sigStoreDir = url.Path
|
sigStoreDir = url.Path
|
||||||
return sigStoreDir, nil
|
return sigStoreDir, nil
|
||||||
|
|
Loading…
Reference in New Issue