@@ -141,7 +141,7 @@ pub enum Subcommand {
141141 paths : Vec < PathBuf > ,
142142 } ,
143143 Setup {
144- path : Option < PathBuf > ,
144+ paths : Vec < PathBuf > ,
145145 } ,
146146}
147147
@@ -543,7 +543,7 @@ Arguments:
543543 Kind :: Bench | Kind :: Clean | Kind :: Dist | Kind :: Install => { }
544544 } ;
545545 // Get any optional paths which occur after the subcommand
546- let mut paths = matches. free [ 1 ..] . iter ( ) . map ( |p| p. into ( ) ) . collect :: < Vec < PathBuf > > ( ) ;
546+ let paths = matches. free [ 1 ..] . iter ( ) . map ( |p| p. into ( ) ) . collect :: < Vec < PathBuf > > ( ) ;
547547
548548 let verbose = matches. opt_present ( "verbose" ) ;
549549
@@ -614,26 +614,7 @@ Arguments:
614614 }
615615 Subcommand :: Run { paths }
616616 }
617- Kind :: Setup => {
618- if paths. len ( ) > 1 {
619- println ! ( "\n at most one profile can be passed to setup\n " ) ;
620- usage ( 1 , & opts, verbose, & subcommand_help)
621- } else if let Some ( path) = paths. pop ( ) {
622- let profile_string = t ! ( path. into_os_string( ) . into_string( ) . map_err(
623- |path| format!( "{} is not a valid UTF8 string" , path. to_string_lossy( ) )
624- ) ) ;
625-
626- profile_string. parse ( ) . unwrap_or_else ( |err| {
627- eprintln ! ( "error: {}" , err) ;
628- eprintln ! ( "help: the available profiles are:" ) ;
629- eprint ! ( "{}" , Profile :: all_for_help( "- " ) ) ;
630- crate :: detail_exit ( 1 ) ;
631- } )
632- } else {
633- t ! ( crate :: setup:: interactive_path( ) )
634- } ;
635- Subcommand :: Setup { paths : vec ! [ PathBuf :: from( profile. as_str( ) ) ] }
636- }
617+ Kind :: Setup => Subcommand :: Setup { paths } ,
637618 } ;
638619
639620 Flags {
0 commit comments