Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-05-21
06:00 • Closed ticket [4fae07ea8a]: Broken exec/auto_execok handling of PATHEXT extensio... artifact: 2da4c2b324 user: apnadkarni
2026-04-27
17:35
Start on [4fae07ea8a]. Process Windows PATHEXT correctly check-in: afe144e73c user: apnadkarni tags: tip-753, tip-753-pathext-fixes
10:51 • New ticket [4fae07ea8a] Broken exec/auto_execok handling of PATHEXT extensions o... artifact: a386525a4c user: apnadkarni

Broken exec/auto_execok handling of PATHEXT extensions on Windows

Closed / Fixed4fae07ea8a7f1d5462800eea0cf2a36b67136472Created 220 days agoUpdated 196 days ago
Descriptionmarkdown2026-04-27 10:51:38

On Windows, auto_execok looks up PATHEXT for extensions that are deemed to be "executable". However, the returned command that is to be passed to exec is wrong. For example,

% file exists foo.vbs
1
% auto_execok foo.vbs
c:/src/tcltk/wip/tcl/win/Release_AMD64_VC1944/foo.vbs
% exec {*}[auto_execok foo.vbs]
couldn't execute "c:\src\tcltk\wip\tcl\win\Release_AMD64_VC1944\foo.vbs": no such file or directory

If auto_execok does not handle PATHEXT, it can be documented as such and return an empty string. Returning some bogus command line that will never work is not advisable.

Referenced by1
apnadkarniplain2026-05-21 06:00:33
Fixed in 9.1. Will not be fixed in earlier releases.
Log in (anonymous is fine) to add a comment.