Skip to content

Commit

Permalink
Exit with non-zero error code when parsing fails (sqlc-dev#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy authored and victoraugustolls committed May 6, 2021
1 parent 4763fca commit 382481b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ func Generate(e Env, dir, filename string, stderr io.Writer) (map[string]string,
name = combo.Kotlin.Package
}

result, errored := parse(e, name, dir, sql.SQL, combo, parseOpts, stderr)
if errored {
result, failed := parse(e, name, dir, sql.SQL, combo, parseOpts, stderr)
if failed {
errored = true
break
}

Expand Down

0 comments on commit 382481b

Please sign in to comment.