Broken exec/auto_execok handling of PATHEXT extensions on Windows
Closed / Fixed4fae07ea8a7f1d5462800eea0cf2a36b67136472Created 219 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
afe144e73cStart on [4fae07ea8a]. Process Windows PATHEXT correctly check-in2026-04-27 17:35:43
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.