diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-06-22 07:27:32 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 07:27:32 +1000 |
commit | a5eb2dfc93afc2899ed6e1ad2b3e029157889f7c (patch) | |
tree | 5fb4abf918304fa13e961cc791c7b43b26367d7c /cli/ops/runtime_compiler.rs | |
parent | 281c4cd8fcf5fd54f558a6922736def2c7804529 (diff) |
fix(#10761): graph errors reported as diagnostics for `Deno.emit()` (#10767)
Fixes #10761
Diffstat (limited to 'cli/ops/runtime_compiler.rs')
-rw-r--r-- | cli/ops/runtime_compiler.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/ops/runtime_compiler.rs b/cli/ops/runtime_compiler.rs index 099f2d555..dd500077a 100644 --- a/cli/ops/runtime_compiler.rs +++ b/cli/ops/runtime_compiler.rs @@ -118,12 +118,14 @@ async fn op_emit( }; let graph = builder.get_graph(); let debug = program_state.flags.log_level == Some(log::Level::Debug); - let (files, result_info) = graph.emit(EmitOptions { + let graph_errors = graph.get_errors(); + let (files, mut result_info) = graph.emit(EmitOptions { bundle_type, check: args.check.unwrap_or(true), debug, maybe_user_config: args.compiler_options, })?; + result_info.diagnostics.extend_graph_errors(graph_errors); Ok(json!({ "diagnostics": result_info.diagnostics, |