Skip to content

Commit f262e31

Browse files
committed
Assert weak node api framework before passing it to Rust
1 parent b39fd69 commit f262e31

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/ferric/src/cargo.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ export function getTargetEnvironmentVariables({
216216
};
217217
} else if (isAppleTarget(target)) {
218218
const weakNodeApiFrameworkPath = getWeakNodeApiFrameworkPath(target);
219+
assert(
220+
fs.existsSync(weakNodeApiFrameworkPath),
221+
`Expected weak-node-api framework at ${weakNodeApiFrameworkPath}`,
222+
);
219223
return {
220224
CARGO_ENCODED_RUSTFLAGS: [
221225
"-L",

0 commit comments

Comments
 (0)