Skip to content

Commit 39537f4

Browse files
format {version} on failure (#15527)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary Fixes #15512 ## Test Plan Manually tested : ``` ~/uv/target/release/uv format --version 999.999.999 --preview-features format error: Failed to install ruff 999.999.999 Caused by: Failed to download from: https://github.com/astral-sh/ruff/releases/download/999.999.999/ruff-x86_64-unknown-linux-gnu.tar.gz Caused by: HTTP status client error (404 Not Found) for url (https://github.com/astral-sh/ruff/releases/download/999.999.999/ruff-x86_64-unknown-linux-gnu.tar.gz) ```
1 parent 8c21baf commit 39537f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/uv/src/commands/project/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub(crate) async fn format(
5959
let version = version.as_ref().unwrap_or(&default_version);
6060
let ruff_path = bin_install(Binary::Ruff, version, &client, &cache, &reporter)
6161
.await
62-
.context("Failed to install ruff {version}")?;
62+
.with_context(|| format!("Failed to install ruff {version}"))?;
6363

6464
let mut command = Command::new(&ruff_path);
6565
// Run ruff in the project root

0 commit comments

Comments
 (0)