Skip to content

Commit f14fb1c

Browse files
committed
Assert paths passed when creating a universal library
1 parent d183257 commit f14fb1c

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
@@ -131,11 +131,17 @@ export function determineXCFrameworkFilename(
131131
}
132132

133133
export async function createUniversalAppleLibrary(libraryPaths: string[]) {
134+
assert(
135+
libraryPaths.length > 0,
136+
"Expected at least one library to create a universal library",
137+
);
134138
// Determine the output path
135139
const filenames = new Set(libraryPaths.map((p) => path.basename(p)));
136140
assert(
137141
filenames.size === 1,
138-
"Expected all darwin libraries to have the same name",
142+
`Expected libraries to have the same name, but got: ${[...filenames].join(
143+
", ",
144+
)}`,
139145
);
140146
const [filename] = filenames;
141147
const lipoParentPath = fs.realpathSync(

0 commit comments

Comments
 (0)