mirror of https://github.com/astral-sh/uv
Remove executable alias; import anstream (#5187)
Post-push review from https://github.com/astral-sh/uv/pull/5160.
This commit is contained in:
parent
8484611753
commit
36a0ee9822
|
|
@ -2215,7 +2215,7 @@ pub struct ToolDirArgs {
|
|||
///
|
||||
/// By default, `uv tool dir` shows the directory into which the tool Python environments
|
||||
/// themselves are installed, rather than the directory containing the linked executables.
|
||||
#[arg(long, alias = "executable")]
|
||||
#[arg(long)]
|
||||
pub bin: bool,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
use anstream::println;
|
||||
use owo_colors::OwoColorize;
|
||||
|
||||
use uv_cache::Cache;
|
||||
|
|
@ -5,5 +6,5 @@ use uv_fs::Simplified;
|
|||
|
||||
/// Show the cache directory.
|
||||
pub(crate) fn cache_dir(cache: &Cache) {
|
||||
anstream::println!("{}", cache.root().simplified_display().cyan());
|
||||
println!("{}", cache.root().simplified_display().cyan());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
use anstream::println;
|
||||
use anyhow::Context;
|
||||
use owo_colors::OwoColorize;
|
||||
|
||||
|
|
@ -13,7 +14,7 @@ pub(crate) fn dir(preview: PreviewMode) -> anyhow::Result<()> {
|
|||
}
|
||||
let installed_toolchains = ManagedPythonInstallations::from_settings()
|
||||
.context("Failed to initialize toolchain settings")?;
|
||||
anstream::println!(
|
||||
println!(
|
||||
"{}",
|
||||
installed_toolchains.root().simplified_display().cyan()
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
use anstream::println;
|
||||
use anyhow::Context;
|
||||
use owo_colors::OwoColorize;
|
||||
|
||||
|
|
@ -14,11 +15,11 @@ pub(crate) fn dir(bin: bool, preview: PreviewMode) -> anyhow::Result<()> {
|
|||
|
||||
if bin {
|
||||
let executable_directory = find_executable_directory()?;
|
||||
anstream::println!("{}", executable_directory.simplified_display().cyan());
|
||||
println!("{}", executable_directory.simplified_display().cyan());
|
||||
} else {
|
||||
let installed_tools =
|
||||
InstalledTools::from_settings().context("Failed to initialize tools settings")?;
|
||||
anstream::println!("{}", installed_tools.root().simplified_display().cyan());
|
||||
println!("{}", installed_tools.root().simplified_display().cyan());
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Reference in New Issue