1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

fix(ext/node): throw when loading cpu-features module (#25257)

It crashes because of NAN usage, we want to trigger the fallback case in
ssh2 by throwing an error.

Fixes https://github.com/denoland/deno/issues/25236
This commit is contained in:
Divy Srivastava 2024-08-28 18:03:15 +05:30 committed by GitHub
parent 97d1635343
commit 44238955fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1121,6 +1121,9 @@ Module._extensions[".json"] = function (module, filename) {
// Native extension for .node
Module._extensions[".node"] = function (module, filename) {
if (filename.endsWith("cpufeatures.node")) {
throw new Error("Using cpu-features module is currently not supported");
}
module.exports = op_napi_open(
filename,
globalThis,