fix: Handle dotted package names in script path resolution (#15300)

<!--
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

Fix WindowsRunnable::from_script_path to correctly append extensions
instead of replacing them when resolving executable paths. This resolves
https://github.com/astral-sh/uv/issues/15165#issue-3304086689.

- Add add_extension_to_path helper that appends extensions properly
- Update extension resolution to use the new helper
- Add tests

## Test Plan

Added unit tests for the new and existing functionality that the change
touches. Tested manually locally on Windows.
<!-- How was it tested? -->

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
Chris Hughes
2025-08-15 22:44:59 +01:00
committed by GitHub
parent 191c9175fe
commit 9346b4d0f6
8 changed files with 230 additions and 2 deletions
@@ -0,0 +1,2 @@
Write-Host "package.name.with.dots version 0.1.0"
exit 0