Skip to content

Commit

Permalink
Show python find output with -q (#6256)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Aug 20, 2024
1 parent 1e1d9f0 commit 4e0e50b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
11 changes: 2 additions & 9 deletions crates/uv/src/commands/python/find.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::fmt::Write;

use anstream::println;
use anyhow::Result;

use uv_cache::Cache;
Expand All @@ -9,15 +8,13 @@ use uv_python::{EnvironmentPreference, PythonInstallation, PythonPreference, Pyt
use uv_warnings::warn_user_once;

use crate::commands::ExitStatus;
use crate::printer::Printer;

/// Find a Python interpreter.
pub(crate) async fn find(
request: Option<String>,
python_preference: PythonPreference,
preview: PreviewMode,
cache: &Cache,
printer: Printer,
) -> Result<ExitStatus> {
if preview.is_disabled() {
warn_user_once!("`uv python find` is experimental and may change without warning");
Expand All @@ -34,11 +31,7 @@ pub(crate) async fn find(
cache,
)?;

writeln!(
printer.stdout(),
"{}",
python.interpreter().sys_executable().user_display()
)?;
println!("{}", python.interpreter().sys_executable().user_display());

Ok(ExitStatus::Success)
}
1 change: 0 additions & 1 deletion crates/uv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,6 @@ async fn run(cli: Cli) -> Result<ExitStatus> {
globals.python_preference,
globals.preview,
&cache,
printer,
)
.await
}
Expand Down

0 comments on commit 4e0e50b

Please sign in to comment.