Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 17d4b7a63e4a29a25155e0aec974b469e886b0f52c91d11f629494fbb3061f47
Ticket: 4dc35e0c0cf24b4a997556b70396d998ebb6adfe
auto_execok on windows not always using absolute path
User & Date: juliannoble2 on 2025-01-27 15:19:12
Changes

  1. icomment:
    Having rethought this a little and played with various options - I think the main problem is from attempting to resolve plain (no path separator) commands in the CWD.
    
    Although cmd.exe does resolve cmdfoo first in the current directory, unix and powershell both require ./cmdfoo if one wants to run what's in the current directory.
    
    Perhaps from muscle-memory in cmd.exe I'm used to that and found it quite convenient - but microsoft has moved away from it (apparently citing security concerns) and the rest of the world don't seem to do it.
    
    I believe the argument goes that interactive shell users are likely to type common commands such as ls, grep etc whilst looking around various directories - and a) expect the command resolved in the path to be always the one used, b) that theoretically a malicious executable binary could somehow lie in wait in a folder that a user then runs by accident.
    I'm not sure how valid the security argument is there - but it seems vaguely plausible.
    
    If Tcl behaved similarly - we could retain the benefits of caching and avoid the anomalies.
    
  2. login: "juliannoble2"
  3. mimetype: "text/plain"