mirror of
https://github.com/FiloSottile/age.git
synced 2026-03-11 08:55:41 +00:00
internal/format: improve error message for old header format (#398)
This commit is contained in:
parent
3b4fb67296
commit
d717942b93
1 changed files with 2 additions and 2 deletions
|
|
@ -189,7 +189,7 @@ func Parse(input io.Reader) (*Header, io.Reader, error) {
|
|||
|
||||
if bytes.HasPrefix(line, footerPrefix) {
|
||||
if r != nil {
|
||||
return nil, nil, errorf("malformed body line %q: reached footer without previous stanza being closed\nNote: this might be a file encrypted with an old beta version of rage. Use rage to decrypt it.", line)
|
||||
return nil, nil, errorf("malformed body line %q: reached footer without previous stanza being closed\nNote: this might be a file encrypted with an old beta version of age or rage. Use age v1.0.0-beta6 or rage to decrypt it.", line)
|
||||
}
|
||||
prefix, args := splitArgs(line)
|
||||
if prefix != string(footerPrefix) || len(args) != 1 {
|
||||
|
|
@ -203,7 +203,7 @@ func Parse(input io.Reader) (*Header, io.Reader, error) {
|
|||
|
||||
} else if bytes.HasPrefix(line, recipientPrefix) {
|
||||
if r != nil {
|
||||
return nil, nil, errorf("malformed body line %q: new stanza started without previous stanza being closed\nNote: this might be a file encrypted with an old beta version of rage. Use rage to decrypt it.", line)
|
||||
return nil, nil, errorf("malformed body line %q: new stanza started without previous stanza being closed\nNote: this might be a file encrypted with an old beta version of age or rage. Use age v1.0.0-beta6 or rage to decrypt it.", line)
|
||||
}
|
||||
r = &Stanza{}
|
||||
prefix, args := splitArgs(line)
|
||||
|
|
|
|||
Loading…
Reference in a new issue