From d717942b931133e2da9190b1b3e4d33419078b6e Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Tue, 26 Apr 2022 19:30:35 +0200 Subject: [PATCH] internal/format: improve error message for old header format (#398) --- internal/format/format.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/format/format.go b/internal/format/format.go index 5da6463..e82c38d 100644 --- a/internal/format/format.go +++ b/internal/format/format.go @@ -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)