Skip to content

Commit

Permalink
Fix bug at the --threads command (crystal-lang#6039)
Browse files Browse the repository at this point in the history
  • Loading branch information
wooster0 authored and chris-huxtable committed Jun 6, 2018
1 parent c355560 commit 265e10c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/crystal/command.cr
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ class Crystal::Command
error "You have input an invalid format, only text and JSON are supported"
end

error "maximum number of threads cannot be lower than 1" if compiler.n_threads < 1

if !no_codegen && !run && Dir.exists?(output_filename)
error "can't use `#{output_filename}` as output filename because it's a directory"
end
Expand Down

0 comments on commit 265e10c

Please sign in to comment.