diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-03-13 17:04:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 17:04:00 -0400 |
commit | a35c8e6588fec21586bcb19146cad19fa01f4f23 (patch) | |
tree | 9960d58720a25263ca3ee8baca0966f2727b0f37 /cli/tools/doc.rs | |
parent | 3db03abf880ae1217d49d8a530a9dfa3f3760e51 (diff) |
fix(info/doc): add missing `--no-lock` and `--lock` flags (#18166)
Closes #18159
Diffstat (limited to 'cli/tools/doc.rs')
-rw-r--r-- | cli/tools/doc.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index e0413ab79..1f8bfad7a 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -7,6 +7,7 @@ use crate::colors; use crate::display::write_json_to_stdout; use crate::display::write_to_stdout_ignore_sigpipe; use crate::file_fetcher::File; +use crate::graph_util::graph_lock_or_exit; use crate::proc_state::ProcState; use crate::tsc::get_types_declaration_file_text; use deno_ast::MediaType; @@ -77,6 +78,11 @@ pub async fn print_docs( ps.file_fetcher.insert_cached(root); let graph = ps.create_graph(vec![root_specifier.clone()]).await?; + + if let Some(lockfile) = &ps.lockfile { + graph_lock_or_exit(&graph, &mut lockfile.lock()); + } + let doc_parser = doc::DocParser::new( graph, doc_flags.private, |