Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make entrypoint writes atomic to avoid overwriting symlinks (#5165)
## Summary It turns out that if `path` is a symlink, `File::create(path)?.write_all(content.as_ref())?` will overwrite the _target_ file. That means an entrypoint named `python` would actually overwrite the user's source Python executable, which is symlinked into the virtual environment. This PR replaces that code with our atomic write method. Closes #5152. ## Test Plan I ran through the test plan `https://github.com/astral-sh/uv/issues/5152`, but used an executable named `bar` linked to `foo.txt` instead...
- Loading branch information