diff options
Diffstat (limited to 'cli/ops/runtime_compiler.rs')
-rw-r--r-- | cli/ops/runtime_compiler.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/cli/ops/runtime_compiler.rs b/cli/ops/runtime_compiler.rs index 2dfd995b5..c2d5582e7 100644 --- a/cli/ops/runtime_compiler.rs +++ b/cli/ops/runtime_compiler.rs @@ -66,15 +66,14 @@ async fn op_emit( // when we are actually resolving modules without provided sources, we should // treat the root module as a dynamic import so that runtime permissions are // applied. - let mut is_dynamic = false; let handler: Arc<Mutex<dyn SpecifierHandler>> = if let Some(sources) = args.sources { Arc::new(Mutex::new(MemoryHandler::new(sources))) } else { - is_dynamic = true; Arc::new(Mutex::new(FetchHandler::new( &program_state, runtime_permissions.clone(), + runtime_permissions.clone(), )?)) }; let maybe_import_map = if let Some(import_map_str) = args.import_map_path { @@ -103,15 +102,12 @@ async fn op_emit( }; let mut builder = GraphBuilder::new(handler, maybe_import_map, None); let root_specifier = resolve_url_or_path(&root_specifier)?; - builder - .add(&root_specifier, is_dynamic) - .await - .map_err(|_| { - type_error(format!( - "Unable to handle the given specifier: {}", - &root_specifier - )) - })?; + builder.add(&root_specifier, false).await.map_err(|_| { + type_error(format!( + "Unable to handle the given specifier: {}", + &root_specifier + )) + })?; let bundle_type = match args.bundle { Some(RuntimeBundleType::Module) => BundleType::Module, Some(RuntimeBundleType::Classic) => BundleType::Classic, |