Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ anstream = { version = "0.6.15" }
anyhow = { version = "1.0.89" }
arcstr = { version = "1.2.0" }
arrayvec = { version = "0.7.6" }
astral-tokio-tar = { version = "0.5.3" }
astral-tokio-tar = { version = "0.5.5" }
async-channel = { version = "2.3.1" }
async-compression = { version = "0.4.12", features = ["bzip2", "gzip", "xz", "zstd"] }
async-trait = { version = "0.1.82" }
Expand Down
8 changes: 7 additions & 1 deletion crates/uv/src/commands/build_frontend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,15 @@ async fn build_impl(
let help = if let Error::Extract(uv_extract::Error::Tar(err)) = &err {
// TODO(konsti): astral-tokio-tar should use a proper error instead of
// encoding everything in strings
// NOTE(ww): We check for both messages below because the both indicate
// different external extraction scenarios; the first is for any
// absolute path outside of the target directory, and the second
// is specifically for symlinks that point outside.
if err.to_string().contains("/bin/python")
&& std::error::Error::source(err).is_some_and(|err| {
err.to_string().ends_with("outside of the target directory")
let err = err.to_string();
err.ends_with("outside of the target directory")
|| err.ends_with("external symlinks are not allowed")
})
{
Some(
Expand Down
2 changes: 1 addition & 1 deletion crates/uv/tests/it/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ fn venv_included_in_sdist() -> Result<()> {
× Failed to build `[TEMP_DIR]/`
├─▶ Invalid tar file
├─▶ failed to unpack `[CACHE_DIR]/sdists-v9/[TMP]/python`
╰─▶ symlink destination for [PYTHON-3.12] is outside of the target directory
╰─▶ symlink path `[PYTHON-3.12]` is absolute, but external symlinks are not allowed
help: This file seems to be part of a virtual environment. Virtual environments must be excluded from source distributions.
");

Expand Down
Loading