File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -253,17 +253,18 @@ Arguments:
253253 }
254254 } ) ;
255255
256- // All subcommands can have an optional "Available paths" section
256+ // All subcommands except `clean` can have an optional "Available paths" section
257257 if matches. opt_present ( "verbose" ) {
258258 let config = Config :: parse ( & [ "build" . to_string ( ) ] ) ;
259259 let mut build = Build :: new ( config) ;
260260 metadata:: build ( & mut build) ;
261261
262262 let maybe_rules_help = Builder :: get_help ( & build, subcommand. as_str ( ) ) ;
263263 extra_help. push_str ( maybe_rules_help. unwrap_or_default ( ) . as_str ( ) ) ;
264- } else {
265- extra_help. push_str ( format ! ( "Run `./x.py {} -h -v` to see a list of available paths." ,
266- subcommand) . as_str ( ) ) ;
264+ } else if subcommand. as_str ( ) != "clean" {
265+ extra_help. push_str ( format ! (
266+ "Run `./x.py {} -h -v` to see a list of available paths." ,
267+ subcommand) . as_str ( ) ) ;
267268 }
268269
269270 // User passed in -h/--help?
@@ -293,7 +294,7 @@ Arguments:
293294 }
294295 "clean" => {
295296 if paths. len ( ) > 0 {
296- println ! ( "\n clean takes no arguments \n " ) ;
297+ println ! ( "\n clean does not take a path argument \n " ) ;
297298 usage ( 1 , & opts, & subcommand_help, & extra_help) ;
298299 }
299300
You can’t perform that action at this time.
0 commit comments