File tree Expand file tree Collapse file tree 5 files changed +18
-6
lines changed
Expand file tree Collapse file tree 5 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri-cli " : patch:bug
3+ " @tauri-apps/cli " : patch:bug
4+ ---
5+
6+ Fixes ` pnpm ` detection when initializing and running a mobile project.
Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ pub fn exec(
103103 if let Some ( bin_stem) = bin_path. file_stem ( ) {
104104 let r = regex:: Regex :: new ( "(nodejs|node)\\ -?([1-9]*)*$" ) . unwrap ( ) ;
105105 if r. is_match ( & bin_stem. to_string_lossy ( ) ) {
106- if let Some ( npm_execpath) = var_os ( "npm_execpath" ) {
106+ if var_os ( "PNPM_PACKAGE_NAME" ) . is_some ( ) {
107+ return ( "pnpm" . into ( ) , build_args) ;
108+ } else if let Some ( npm_execpath) = var_os ( "npm_execpath" ) {
107109 let manager_stem = PathBuf :: from ( & npm_execpath)
108110 . file_stem ( )
109111 . unwrap ( )
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ pub fn command(options: Options) -> Result<()> {
6161 }
6262
6363 // `xcode-script` is ran from the `gen/apple` folder when not using NPM.
64- if var_os ( "npm_lifecycle_event" ) . is_none ( ) {
64+ if var_os ( "npm_lifecycle_event" ) . is_none ( ) && var_os ( "PNPM_PACKAGE_NAME" ) . is_none ( ) {
6565 set_current_dir ( current_dir ( ) ?. parent ( ) . unwrap ( ) . parent ( ) . unwrap ( ) ) . unwrap ( ) ;
6666 }
6767
Original file line number Diff line number Diff line change @@ -261,12 +261,15 @@ fn read_options(identifier: &str) -> CliOptions {
261261 let runtime = tokio:: runtime:: Runtime :: new ( ) . unwrap ( ) ;
262262 let options = runtime
263263 . block_on ( async move {
264+ let addr_path = temp_dir ( ) . join ( format ! ( "{identifier}-server-addr" ) ) ;
264265 let ( tx, rx) = WsTransportClientBuilder :: default ( )
265266 . build (
266267 format ! (
267268 "ws://{}" ,
268- read_to_string( temp_dir( ) . join( format!( "{identifier}-server-addr" ) ) )
269- . expect( "missing addr file" )
269+ read_to_string( & addr_path) . unwrap_or_else( |e| panic!(
270+ "failed to read missing addr file {}: {e}" ,
271+ addr_path. display( )
272+ ) )
270273 )
271274 . parse ( )
272275 . unwrap ( ) ,
Original file line number Diff line number Diff line change @@ -127,8 +127,9 @@ targets:
127127 name : Build Rust Code
128128 basedOnDependencyAnalysis : false
129129 outputFiles :
130- - $(SRCROOT)/target/aarch64-apple-ios/${CONFIGURATION}/deps/lib{{app.lib-name}}.a
131- - $(SRCROOT)/target/x86_64-apple-ios/${CONFIGURATION}/deps/lib{{app.lib-name}}.a
130+ - $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/lib{{app.lib-name}}.a
131+ - $(SRCROOT)/Externals/arm64/${CONFIGURATION}/lib{{app.lib-name}}.a
132+ - $(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/lib{{app.lib-name}}.a
132133 {{~#if ios-post-compile-scripts}}
133134 postCompileScripts :
134135 {{~#each ios-post-compile-scripts}}{{#if this.path}}
You can’t perform that action at this time.
0 commit comments