@@ -65,16 +65,14 @@ async function writeFrameworkInfoPlist({
6565async function updateLibraryInstallName ( {
6666 binaryPath,
6767 libraryName,
68- cwd,
6968} : {
7069 binaryPath : string ;
7170 libraryName : string ;
72- cwd : string ;
7371} ) {
7472 await spawn (
7573 "install_name_tool" ,
7674 [ "-id" , `@rpath/${ libraryName } .framework/${ libraryName } ` , binaryPath ] ,
77- { outputMode : "buffered" , cwd } ,
75+ { outputMode : "buffered" } ,
7876 ) ;
7977}
8078
@@ -110,9 +108,8 @@ async function createFlatFramework({
110108 // TODO: Consider copying the library instead of renaming it
111109 await fs . promises . rename ( libraryPath , newLibraryPath ) ;
112110 await updateLibraryInstallName ( {
113- binaryPath : libraryName ,
111+ binaryPath : newLibraryPath ,
114112 libraryName,
115- cwd : frameworkPath ,
116113 } ) ;
117114 return frameworkPath ;
118115}
@@ -162,9 +159,8 @@ async function createVersionedFramework({
162159 const versionBinaryPath = path . join ( versionDir , libraryName ) ;
163160 await fs . promises . rename ( libraryPath , versionBinaryPath ) ;
164161 await updateLibraryInstallName ( {
165- binaryPath : path . join ( "Versions" , VERSIONED_FRAMEWORK_VERSION , libraryName ) ,
162+ binaryPath : versionBinaryPath ,
166163 libraryName,
167- cwd : frameworkPath ,
168164 } ) ;
169165
170166 const currentLink = path . join ( versionsDir , "Current" ) ;
0 commit comments