Skip to content

Commit 50cfbd9

Browse files
authored
Show file extensions on available commands when not .exe (#9099)
Closes #8770
1 parent 57ff533 commit 50cfbd9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,11 @@ pub(crate) async fn run(
897897
.map(|entry| entry.path())
898898
.filter(|path| is_executable(path))
899899
.map(|path| {
900-
if cfg!(windows) {
900+
if cfg!(windows)
901+
&& path
902+
.extension()
903+
.is_some_and(|exe| exe == std::env::consts::EXE_EXTENSION)
904+
{
901905
// Remove the extensions.
902906
path.with_extension("")
903907
} else {

crates/uv/tests/it/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ fn run_no_args() -> Result<()> {
248248
249249
The following commands are available in the environment:
250250
251-
- pydoc
251+
- pydoc.bat
252252
- python
253253
- pythonw
254254

0 commit comments

Comments
 (0)