File tree 3 files changed +7
-3
lines changed
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> {
825
825
Subcommand :: Install { ref paths } => ( Kind :: Install , & paths[ ..] ) ,
826
826
Subcommand :: Run { ref paths } => ( Kind :: Run , & paths[ ..] ) ,
827
827
Subcommand :: Format { .. } => ( Kind :: Format , & [ ] [ ..] ) ,
828
- Subcommand :: Setup { ref paths } => ( Kind :: Setup , & paths [ .. ] ) ,
828
+ Subcommand :: Setup { ref path } => ( Kind :: Setup , std :: slice :: from_ref ( path ) ) ,
829
829
Subcommand :: Clean { .. } => {
830
830
panic ! ( )
831
831
}
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ pub enum Subcommand {
142
142
paths : Vec < PathBuf > ,
143
143
} ,
144
144
Setup {
145
- paths : Vec < PathBuf > ,
145
+ path : PathBuf ,
146
146
} ,
147
147
}
148
148
@@ -633,7 +633,7 @@ Arguments:
633
633
} else {
634
634
t ! ( crate :: setup:: interactive_path( ) )
635
635
} ;
636
- Subcommand :: Setup { paths : vec ! [ PathBuf :: from( profile. as_str( ) ) ] }
636
+ Subcommand :: Setup { path : PathBuf :: from ( profile. as_str ( ) ) }
637
637
}
638
638
} ;
639
639
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ impl Step for Profile {
98
98
}
99
99
100
100
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.
101
105
let profile: Profile = run
102
106
. paths
103
107
. first ( )
You can’t perform that action at this time.
0 commit comments