-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Disallow writing symlinks outside the source distribution target directory #12259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1754,13 +1754,14 @@ fn build_with_symlink() -> Result<()> { | |
| build-backend = "hatchling.build" | ||
| "#})?; | ||
| fs_err::os::unix::fs::symlink( | ||
| context.temp_dir.child("pyproject.toml.real"), | ||
| "pyproject.toml.real", | ||
| context.temp_dir.child("pyproject.toml"), | ||
| )?; | ||
| context | ||
| .temp_dir | ||
| .child("src/softlinked/__init__.py") | ||
| .touch()?; | ||
| fs_err::remove_dir_all(&context.venv)?; | ||
| uv_snapshot!(context.filters(), context.build(), @r###" | ||
| success: true | ||
| exit_code: 0 | ||
|
|
@@ -1799,6 +1800,7 @@ fn build_with_hardlink() -> Result<()> { | |
| .temp_dir | ||
| .child("src/hardlinked/__init__.py") | ||
| .touch()?; | ||
| fs_err::remove_dir_all(&context.venv)?; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @konstin -- It looks like in this case, we're including the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's usually respecting the git configuration, maybe it's something about how we're setting up our tests, possibly because we don't have git repo? I'd have to dig a bit to figure that out. |
||
| uv_snapshot!(context.filters(), context.build(), @r###" | ||
| success: true | ||
| exit_code: 0 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably reject this when building?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least with the uv build backend we support it by adding the real file instead, it's useful when you have e.g. a shared readme or license file in a monorepo.