Skip to content

Commit ba07e0c

Browse files
committed
feat(wrtagflag): add hint for v0.30.0 migration
1 parent a671b49 commit ba07e0c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cmd/internal/wrtagflag/wrtagflag.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ func (pf *pathFormatParser) Set(value string) error {
132132
if err != nil {
133133
return fmt.Errorf("make abs: %w", err)
134134
}
135-
return pf.Parse(value)
135+
if err := pf.Parse(value); err != nil {
136+
return v30MigrationHint(err)
137+
}
138+
return nil
136139
}
137140
func (pf pathFormatParser) String() string {
138141
if pf.Format == nil || pf.Root() == "" {
@@ -141,6 +144,13 @@ func (pf pathFormatParser) String() string {
141144
return pf.Root() + "/..."
142145
}
143146

147+
// TODO: delete after June 2026.
148+
//
149+
//nolint:godox
150+
func v30MigrationHint(err error) error {
151+
return fmt.Errorf("%w (NOTE: wrtag v0.30.0 changed the data available to path-format. if your config is from v0.2x, you need to migrate. please see https://github.com/sentriz/wrtag/releases/tag/v0.30.0)", err)
152+
}
153+
144154
type researchLinkParser struct{ *researchlink.Builder }
145155

146156
func (r *researchLinkParser) Set(value string) error {

0 commit comments

Comments
 (0)