Skip to content

Commit

Permalink
Use different exit codes for fails and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jvprat committed Apr 27, 2016
1 parent 667cc43 commit 0153627
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tsc
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,15 @@ if opts.junit then
telescope.junit_report(contexts, results, file_contexts, opts.junit)
end

local fail = false
for _, v in pairs(results) do
if v.status_code == telescope.status_codes.err or
v.status_code == telescope.status_codes.fail then
if v.status_code == telescope.status_codes.err then
os.exit(1)
end
if v.status_code == telescope.status_codes.fail then
fail = true
end
end
if fail then
os.exit(2)
end

0 comments on commit 0153627

Please sign in to comment.