summaryrefslogtreecommitdiff
path: root/cli/tools/info.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-11-25 19:04:30 -0500
committerGitHub <noreply@github.com>2022-11-26 00:04:30 +0000
commit0c0af67f89b610eb61e4f66a5dbf665474aa9383 (patch)
treeb2da2181d6ce10395da176ca8ac352345fc65fca /cli/tools/info.rs
parente0dd275935c49f5b5b844123d621c5dea1761983 (diff)
refactor: `DenoDir` - move to cache folder and make `root_dir` private (#16823)
Diffstat (limited to 'cli/tools/info.rs')
-rw-r--r--cli/tools/info.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/cli/tools/info.rs b/cli/tools/info.rs
index f718d8e52..38aa40a5e 100644
--- a/cli/tools/info.rs
+++ b/cli/tools/info.rs
@@ -22,7 +22,6 @@ use crate::args::Flags;
use crate::args::InfoFlags;
use crate::checksum;
use crate::display;
-use crate::lsp;
use crate::npm::NpmPackageId;
use crate::npm::NpmPackageReference;
use crate::npm::NpmPackageReq;
@@ -58,13 +57,12 @@ fn print_cache_info(
json: bool,
location: Option<&deno_core::url::Url>,
) -> Result<(), AnyError> {
- let deno_dir = &state.dir.root;
+ let deno_dir = &state.dir.root_path_for_display();
let modules_cache = &state.file_fetcher.get_http_cache_location();
let npm_cache = &state.npm_cache.as_readonly().get_cache_location();
let typescript_cache = &state.dir.gen_cache.location;
- let registry_cache =
- &state.dir.root.join(lsp::language_server::REGISTRIES_PATH);
- let mut origin_dir = state.dir.root.join("location_data");
+ let registry_cache = &state.dir.registries_folder_path();
+ let mut origin_dir = state.dir.origin_data_folder_path();
if let Some(location) = &location {
origin_dir =
@@ -75,7 +73,7 @@ fn print_cache_info(
if json {
let mut output = json!({
- "denoDir": deno_dir,
+ "denoDir": deno_dir.to_string(),
"modulesCache": modules_cache,
"npmCache": npm_cache,
"typescriptCache": typescript_cache,
@@ -89,11 +87,7 @@ fn print_cache_info(
display::write_json_to_stdout(&output)
} else {
- println!(
- "{} {}",
- colors::bold("DENO_DIR location:"),
- deno_dir.display()
- );
+ println!("{} {}", colors::bold("DENO_DIR location:"), deno_dir);
println!(
"{} {}",
colors::bold("Remote modules cache:"),