1
1
use anyhow:: Result ;
2
- use clap:: { Parser , ValueEnum } ;
2
+ use clap:: { builder :: BoolishValueParser , Parser , ValueEnum } ;
3
3
use clap_verbosity_flag:: InfoLevel ;
4
4
use log:: LevelFilter ;
5
5
use regex:: Regex ;
@@ -41,7 +41,8 @@ struct Args {
41
41
#[ arg( short, long) ]
42
42
after_build : Option < String > ,
43
43
44
- #[ arg( short, long, default_value = "false" ) ]
44
+ // Disable timing on the output
45
+ #[ arg( short, long, default_value = "false" , num_args = 0 ..=1 ) ]
45
46
no_timing : bool ,
46
47
47
48
/// Verbosity:
@@ -56,7 +57,7 @@ struct Args {
56
57
57
58
/// This creates a source_dirs.json file at the root of the monorepo, which is needed when you
58
59
/// want to use Reanalyze
59
- #[ arg( short, long, default_value = " false" ) ]
60
+ #[ arg( short, long, default_value_t = false , num_args = 0 ..= 1 ) ]
60
61
create_sourcedirs : bool ,
61
62
62
63
/// This prints the compiler arguments. It expects the path to a rescript.json file.
@@ -68,7 +69,7 @@ struct Args {
68
69
/// It's important to know that we currently do not discern between project src, and
69
70
/// dependencies. So enabling this flag will enable building _all_ development dependencies of
70
71
/// _all_ packages
71
- #[ arg( long, default_value = " false" ) ]
72
+ #[ arg( long, default_value_t = false , num_args = 0 ..= 1 ) ]
72
73
dev : bool ,
73
74
74
75
/// To be used in conjunction with compiler_args
0 commit comments