We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2703ee4 commit e7d15a0Copy full SHA for e7d15a0
src/cling/helper.cr
@@ -10,23 +10,21 @@ module Cling
10
add_option 'v', "version", description: "sends the app version"
11
end
12
13
- def pre_run(arguments : Cling::Arguments, options : Cling::Options) : Bool
+ def pre_run(arguments : Cling::Arguments, options : Cling::Options) : Nil
14
if arguments.empty? && options.empty?
15
Formatter.new.generate(self).to_s(stdout)
16
- return false
+ exit_program 0
17
18
19
case options
20
when .has? "help"
21
22
23
- false
24
when .has? "version"
25
puts @version
26
27
28
- else
29
- true
30
31
32
0 commit comments