Skip to content

Commit

Permalink
fix: do not fail silently on type constraint error in your variant file
Browse files Browse the repository at this point in the history
For example variant has been failing silently on `type = "string"` (this needs to be `type = string`). This fixes that. The error message would now look like:

```
Error: Invalid type specification
  on example/test.variant line 3, in option "namespace":
   3:   type = "string"
A type specification is either a primitive type keyword (bool, number, string) or a complex type
constructor call, like list(string).
```
  • Loading branch information
mumoshu committed Apr 7, 2020
1 parent 365b272 commit 7ead177
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,8 @@ func (r *Runner) Run(arguments []string, opt ...RunOptions) error {
r.runCmd, err = r.Cobra()

if err != nil {
r.ap.PrintError(err)

return err
}
}
Expand Down

0 comments on commit 7ead177

Please sign in to comment.