Skip to content

Commit 7db56d8

Browse files
committed
test: attempting fixes for both mac and win
1 parent 9271798 commit 7db56d8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

scripts/brew-install.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@ brew link --overwrite rustup-init
2020
# Brew does not provide specific versions of rust
2121
# However rustup provides specific versions
2222
# Here we provide both toolchains
23-
rustup-init \
24-
--default-toolchain 1.68.2 \
25-
--target x86_64-apple-darwin aarch64-apple-darwin \
26-
-y
23+
rustup-init --default-toolchain 1.68.2 -y
24+
rustup add x86_64-apple-darwin aarch64-apple-darwin

src/native/quiche.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ function requireBinding(targets: Array<string>): Quiche {
7070
} catch (e) {
7171
if (e.code !== 'MODULE_NOT_FOUND') throw e;
7272
}
73+
try {
74+
return require(url.pathToFileURL(prebuildTarget).href);
75+
} catch (e) {
76+
if (e.code !== 'MODULE_NOT_FOUND') throw e;
77+
}
7378
}
7479
const npmTargets = targets.map((target) => `@matrixai/quic-${target}`);
7580
for (const npmTarget of npmTargets) {
@@ -78,6 +83,11 @@ function requireBinding(targets: Array<string>): Quiche {
7883
} catch (e) {
7984
if (e.code !== 'MODULE_NOT_FOUND') throw e;
8085
}
86+
try {
87+
return require(url.pathToFileURL(npmTarget).href);
88+
} catch (e) {
89+
if (e.code !== 'MODULE_NOT_FOUND') throw e;
90+
}
8191
}
8292
throw new Error(
8393
`Failed requiring possible native bindings: ${prebuildTargets.concat(

0 commit comments

Comments
 (0)