We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f48dea9 commit f48f5eeCopy full SHA for f48f5ee
1 file changed
matter/spec/option.go
@@ -50,11 +50,20 @@ func (po *ParserOptions) AfterApply() error {
50
if !exists {
51
return fmt.Errorf("spec root \"%s\" does not exist", po.Root)
52
}
53
- if po.ErrataPath != "" && !filepath.IsAbs(po.ErrataPath) {
54
- po.ErrataPath, err = filepath.Abs(po.ErrataPath)
+ if po.ErrataPath != "" {
+ if !filepath.IsAbs(po.ErrataPath) {
55
+ po.ErrataPath, err = filepath.Abs(po.ErrataPath)
56
+ if err != nil {
57
+ return err
58
+ }
59
60
+ exists, err = files.Exists(po.ErrataPath)
61
if err != nil {
62
return err
63
64
+ if !exists {
65
+ return fmt.Errorf("errata path \"%s\" does not exist", po.ErrataPath)
66
67
68
return nil
69
0 commit comments