From 1d20530f2dfbfa8e20dad236558d4ae82ebebdf3 Mon Sep 17 00:00:00 2001 From: Nils Koch Date: Mon, 7 Jul 2025 18:16:50 +0200 Subject: [PATCH] trim content of `INSTALLER` file (#14488) ## Summary We are using UV as a library and `installer()` returned `"pip\n"`. The packages got installed by the pip package manager and not by UV. pip seems to add a new line to the `INSTALLER` file and UV does not. ## Test Plan --- crates/uv-distribution-types/src/installed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv-distribution-types/src/installed.rs b/crates/uv-distribution-types/src/installed.rs index d5813f4c7..a285fc1db 100644 --- a/crates/uv-distribution-types/src/installed.rs +++ b/crates/uv-distribution-types/src/installed.rs @@ -365,7 +365,7 @@ impl InstalledDist { pub fn installer(&self) -> Result, InstalledDistError> { let path = self.install_path().join("INSTALLER"); match fs::read_to_string(path) { - Ok(installer) => Ok(Some(installer)), + Ok(installer) => Ok(Some(installer.trim().to_owned())), Err(err) if err.kind() == std::io::ErrorKind::NotFound => Ok(None), Err(err) => Err(err.into()), }