File tree Expand file tree Collapse file tree 5 files changed +11
-10
lines changed
crates/tauri-cli/src/mobile Expand file tree Collapse file tree 5 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ enum Commands {
104104}
105105
106106pub fn command ( cli : Cli , verbosity : u8 ) -> Result < ( ) > {
107- let dirs = crate :: helpers:: app_paths:: resolve_dirs ( ) ;
108107 let noise_level = NoiseLevel :: from_occurrences ( verbosity as u64 ) ;
109108 match cli. command {
110109 Commands :: Init ( options) => init_command (
@@ -113,7 +112,6 @@ pub fn command(cli: Cli, verbosity: u8) -> Result<()> {
113112 false ,
114113 options. skip_targets_install ,
115114 options. config ,
116- & dirs,
117115 ) ?,
118116 Commands :: Dev ( options) => dev:: command ( options, noise_level) ?,
119117 Commands :: Build ( options) => build:: command ( options, noise_level) . map ( |_| ( ) ) ?,
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ pub fn command(
2929 reinstall_deps : bool ,
3030 skip_targets_install : bool ,
3131 config : Vec < ConfigValue > ,
32- dirs : & Dirs ,
3332) -> Result < ( ) > {
33+ let dirs = crate :: helpers:: app_paths:: resolve_dirs ( ) ;
3434 let wrapper = TextWrapper :: default ( ) ;
3535
3636 exec (
@@ -45,14 +45,14 @@ pub fn command(
4545 Ok ( ( ) )
4646}
4747
48- pub fn exec (
48+ fn exec (
4949 target : Target ,
5050 wrapper : & TextWrapper ,
5151 #[ allow( unused_variables) ] non_interactive : bool ,
5252 #[ allow( unused_variables) ] reinstall_deps : bool ,
5353 skip_targets_install : bool ,
5454 config : Vec < ConfigValue > ,
55- dirs : & Dirs ,
55+ dirs : Dirs ,
5656) -> Result < App > {
5757 let tauri_config = get_tauri_config (
5858 target. platform_target ( ) ,
Original file line number Diff line number Diff line change @@ -167,7 +167,12 @@ pub struct BuiltApplication {
167167 options_handle : OptionsHandle ,
168168}
169169
170- pub fn command ( options : Options , noise_level : NoiseLevel , dirs : & Dirs ) -> Result < BuiltApplication > {
170+ pub fn command ( options : Options , noise_level : NoiseLevel ) -> Result < BuiltApplication > {
171+ let dirs = crate :: helpers:: app_paths:: resolve_dirs ( ) ;
172+ run ( options, noise_level, & dirs)
173+ }
174+
175+ pub fn run ( options : Options , noise_level : NoiseLevel , dirs : & Dirs ) -> Result < BuiltApplication > {
171176 let mut build_options: BuildOptions = options. clone ( ) . into ( ) ;
172177 build_options. target = Some (
173178 Target :: all ( )
Original file line number Diff line number Diff line change @@ -102,18 +102,16 @@ enum Commands {
102102
103103pub fn command ( cli : Cli , verbosity : u8 ) -> Result < ( ) > {
104104 let noise_level = NoiseLevel :: from_occurrences ( verbosity as u64 ) ;
105- let dirs = crate :: helpers:: app_paths:: resolve_dirs ( ) ;
106105 match cli. command {
107106 Commands :: Init ( options) => init_command (
108107 MobileTarget :: Ios ,
109108 options. ci ,
110109 options. reinstall_deps ,
111110 options. skip_targets_install ,
112111 options. config ,
113- & dirs,
114112 ) ?,
115113 Commands :: Dev ( options) => dev:: command ( options, noise_level) ?,
116- Commands :: Build ( options) => build:: command ( options, noise_level, & dirs ) . map ( |_| ( ) ) ?,
114+ Commands :: Build ( options) => build:: command ( options, noise_level) . map ( |_| ( ) ) ?,
117115 Commands :: Run ( options) => run:: command ( options, noise_level) ?,
118116 Commands :: XcodeScript ( options) => xcode_script:: command ( options) ?,
119117 }
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> {
7676
7777 let dirs = crate :: helpers:: app_paths:: resolve_dirs ( ) ;
7878
79- let mut built_application = super :: build:: command (
79+ let mut built_application = super :: build:: run (
8080 super :: build:: Options {
8181 debug : !options. release ,
8282 targets : Some ( vec ! [ ] ) , /* skips IPA build since there's no target */
You can’t perform that action at this time.
0 commit comments