@@ -48,7 +48,7 @@ fn main() -> anyhow::Result<()> {
48
48
) ?;
49
49
}
50
50
51
- let mut config = GlobalConfig :: new ( ) . set_level ( args. verbosity . log_level ( ) ) ;
51
+ let mut config = GlobalConfig :: new ( ) . set_level ( args. check_release . verbosity . log_level ( ) ) ;
52
52
config. shell_note ( "Use `--explain <id>` to see more details" ) ?;
53
53
std:: process:: exit ( 0 ) ;
54
54
} else if let Some ( id) = args. explain . as_deref ( ) {
@@ -75,19 +75,15 @@ fn main() -> anyhow::Result<()> {
75
75
std:: process:: exit ( 0 ) ;
76
76
}
77
77
78
- match args. command {
79
- Some ( SemverChecksCommands :: CheckRelease ( args) ) => {
80
- let check: cargo_semver_checks:: Check = args. into ( ) ;
81
- let report = check. check_release ( ) ?;
82
- if report. success ( ) {
83
- std:: process:: exit ( 0 )
84
- } else {
85
- std:: process:: exit ( 1 ) ;
86
- }
87
- }
88
- None => {
89
- anyhow:: bail!( "subcommand required" ) ;
90
- }
78
+ let check: cargo_semver_checks:: Check = match args. command {
79
+ Some ( SemverChecksCommands :: CheckRelease ( args) ) => args. into ( ) ,
80
+ None => args. check_release . into ( ) ,
81
+ } ;
82
+ let report = check. check_release ( ) ?;
83
+ if report. success ( ) {
84
+ std:: process:: exit ( 0 ) ;
85
+ } else {
86
+ std:: process:: exit ( 1 ) ;
91
87
}
92
88
}
93
89
@@ -111,8 +107,8 @@ struct SemverChecks {
111
107
#[ arg( long, global = true , exclusive = true ) ]
112
108
list : bool ,
113
109
114
- #[ command ( flatten) ]
115
- verbosity : clap_verbosity_flag :: Verbosity < clap_verbosity_flag :: InfoLevel > ,
110
+ #[ clap ( flatten) ]
111
+ check_release : CheckRelease ,
116
112
117
113
#[ command( subcommand) ]
118
114
command : Option < SemverChecksCommands > ,
0 commit comments