mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 12:58:54 -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:
parent
97d1635343
commit
44238955fb
1 changed files with 3 additions and 0 deletions
|
@ -1121,6 +1121,9 @@ Module._extensions[".json"] = function (module, filename) {
|
||||||
|
|
||||||
// Native extension for .node
|
// Native extension for .node
|
||||||
Module._extensions[".node"] = function (module, filename) {
|
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(
|
module.exports = op_napi_open(
|
||||||
filename,
|
filename,
|
||||||
globalThis,
|
globalThis,
|
||||||
|
|
Loading…
Reference in a new issue