Handle people specifying PGP key files with @ in front

This commit is contained in:
Jeff Mitchell
2015-08-25 09:41:45 -07:00
parent d2023234b9
commit ee10f1a565
2 changed files with 4 additions and 1 deletions

View File

@@ -27,6 +27,9 @@ func (g *pgpkeys) Set(value string) error {
return errors.New("pgp-keys can only be specified once")
}
for _, keyfile := range strings.Split(value, ",") {
if keyfile[0] == '@' {
keyfile = keyfile[1:]
}
f, err := os.Open(keyfile)
if err != nil {
return err