Skip to content

Commit

Permalink
main: fix printing in check mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Aug 9, 2024
1 parent 4a13a3f commit 9edf7d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function main(argv)
end

# Print file info unless quiet and unless stdin and/or stdout is involved
print_progress = !(quiet || input_is_stdin || !output_is_file)
print_progress = !(quiet || input_is_stdin || !(output_is_file || check))

# Print file info unless quiet and unless input/output is stdin/stdout
if print_progress
Expand Down Expand Up @@ -251,7 +251,8 @@ function main(argv)
print_progress && errln()
# Limit stacktrace to 5 frames because Runic uses recursion a lot and 5 should
# be enough to see where the error occurred.
bt = stacktrace(catch_backtrace())[1:5]
bt = stacktrace(catch_backtrace())
bt = bt[1:min(5, length(bt))]
rc = panic(err, bt)
if fail_fast
return rc
Expand Down

0 comments on commit 9edf7d7

Please sign in to comment.