Skip to content

Commit

Permalink
Fix bug at the --threads command (#6039)
Browse files Browse the repository at this point in the history
  • Loading branch information
wooster0 authored and Serdar Dogruyol committed May 1, 2018
1 parent fe871e1 commit 9da2831
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/crystal/command.cr
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 9da2831

Please sign in to comment.