summaryrefslogtreecommitdiff
path: root/cli/build.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-04-24 19:44:35 -0400
committerGitHub <noreply@github.com>2023-04-24 19:44:35 -0400
commitaa286fdecb15461ef8ddd4c372f5a13e01e1cb7b (patch)
tree47ddc4e428b650fae536c3c1eb73ae5a64c4fe6a /cli/build.rs
parentbb74e75a049768c2949aa08de6752a16813b97de (diff)
refactor(ext/node): allow injecting `NodeFs` from CLI (#18829)
This allows providing a `NodeFs` as part of the `WorkerOptions`.
Diffstat (limited to 'cli/build.rs')
-rw-r--r--cli/build.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/build.rs b/cli/build.rs
index 9be441bcc..7a3252e20 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -2,6 +2,7 @@
use std::env;
use std::path::PathBuf;
+use std::sync::Arc;
use deno_core::snapshot_util::*;
use deno_core::Extension;
@@ -361,7 +362,10 @@ fn create_cli_snapshot(snapshot_path: PathBuf) {
deno_http::deno_http::init_ops(),
deno_io::deno_io::init_ops(Default::default()),
deno_fs::deno_fs::init_ops::<_, PermissionsContainer>(false, StdFs),
- deno_node::deno_node::init_ops::<deno_runtime::RuntimeNodeEnv>(None),
+ deno_node::deno_node::init_ops::<deno_runtime::RuntimeNodeEnv>(
+ None,
+ Some(Arc::new(deno_node::RealFs)),
+ ),
cli::init_ops_and_esm(), // NOTE: This needs to be init_ops_and_esm!
];