Skip to content

Commit 4b87947

Browse files
committed
Assert paths passed when creating a universal library
1 parent f262e31 commit 4b87947

File tree

1 file changed

+7
-1
lines changed
  • packages/host/src/node/prebuilds

1 file changed

+7
-1
lines changed

packages/host/src/node/prebuilds/apple.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,17 @@ export function determineXCFrameworkFilename(
147147
}
148148

149149
export async function createUniversalAppleLibrary(libraryPaths: string[]) {
150+
assert(
151+
libraryPaths.length > 0,
152+
"Expected at least one library to create a universal library",
153+
);
150154
// Determine the output path
151155
const filenames = new Set(libraryPaths.map((p) => path.basename(p)));
152156
assert(
153157
filenames.size === 1,
154-
"Expected all darwin libraries to have the same name",
158+
`Expected libraries to have the same name, but got: ${[...filenames].join(
159+
", ",
160+
)}`,
155161
);
156162
const [filename] = filenames;
157163
const lipoParentPath = fs.realpathSync(

0 commit comments

Comments
 (0)