File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -825,7 +825,7 @@ impl<'a> Builder<'a> {
825825 Subcommand :: Install { ref paths } => ( Kind :: Install , & paths[ ..] ) ,
826826 Subcommand :: Run { ref paths } => ( Kind :: Run , & paths[ ..] ) ,
827827 Subcommand :: Format { .. } => ( Kind :: Format , & [ ] [ ..] ) ,
828- Subcommand :: Setup { ref paths } => ( Kind :: Setup , & paths [ .. ] ) ,
828+ Subcommand :: Setup { ref path } => ( Kind :: Setup , std :: slice :: from_ref ( path ) ) ,
829829 Subcommand :: Clean { .. } => {
830830 panic ! ( )
831831 }
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ pub enum Subcommand {
142142 paths : Vec < PathBuf > ,
143143 } ,
144144 Setup {
145- paths : Vec < PathBuf > ,
145+ path : PathBuf ,
146146 } ,
147147}
148148
@@ -633,7 +633,7 @@ Arguments:
633633 } else {
634634 t ! ( crate :: setup:: interactive_path( ) )
635635 } ;
636- Subcommand :: Setup { paths : vec ! [ PathBuf :: from( profile. as_str( ) ) ] }
636+ Subcommand :: Setup { path : PathBuf :: from ( profile. as_str ( ) ) }
637637 }
638638 } ;
639639
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ impl Step for Profile {
9898 }
9999
100100 fn make_run ( run : RunConfig < ' _ > ) {
101+ // for Profile, `run.paths` will have 1 and only 1 element
102+ // this is because we only accept at most 1 path from user input.
103+ // If user calls `x.py setup` without arguments, the interacctive TUI
104+ // will guide user to provide one.
101105 let profile: Profile = run
102106 . paths
103107 . first ( )
You can’t perform that action at this time.
0 commit comments