mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -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
8db5e9bbe1
commit
14e9b5049d
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue