diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-08-24 18:07:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 18:07:49 +0200 |
commit | 6bb72a80863ac3913d32ea21aae32dd327ce6b71 (patch) | |
tree | 9a94d2df9ba46eec6a992fc749c4b80fbe62c11b /runtime/build.rs | |
parent | 684aabbc252fe895e8f5de82c5fa4b7b6290f3ea (diff) |
feat(unstable): add more permission checks for ext/node/ (#15581)
Diffstat (limited to 'runtime/build.rs')
-rw-r--r-- | runtime/build.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/build.rs b/runtime/build.rs index 5e8132656..a9ba09825 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -125,6 +125,15 @@ mod not_docs { } } + impl deno_node::NodePermissions for Permissions { + fn check_read( + &mut self, + _p: &Path, + ) -> Result<(), deno_core::error::AnyError> { + unreachable!("snapshotting!") + } + } + impl deno_net::NetPermissions for Permissions { fn check_net<T: AsRef<str>>( &mut self, @@ -167,7 +176,7 @@ mod not_docs { deno_broadcast_channel::InMemoryBroadcastChannel::default(), false, // No --unstable. ), - deno_node::init(false, None), // No --unstable. + deno_node::init::<Permissions>(false, None), // No --unstable. deno_ffi::init::<Permissions>(false), deno_net::init::<Permissions>( None, false, // No --unstable. |