Artifacts Associated With Ticket b492c33154
Ticket change [1eae5dcb01] (rid 253306) by apnadkarni on 2026-05-06 15:59:34:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
The following inconsistent behavior is seen on Windows. Setting an env variable to the empty string unsets it (as documented) but `info exists` thinks it is still defined. ``` % info exists env(TMP) 1 % set env(TMP) D:\Temp % set env(TMP) "" % info exists env(TMP) 1 % set env(TMP) can't read "env(TMP)": no such variable ```
- foundin initialized to: "8.6"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to: "Inconsistent behaviour with env array on Windows"
- type initialized to: "Bug"
Ticket change [8a115f5a74] (rid 253311) by apnadkarni on 2026-05-06 17:00:22:
- login: "apnadkarni"
- mimetype: "text/plain"
- subsystem changed to: "08. Environment Variables"
Ticket change [8d43d217d0] (rid 253450) by chw on 2026-05-13 20:24:20:
- icomment: "How about the approach in the attached diff?"
- login: "chw"
- mimetype: "text/plain"
Add attachment "tclEnv.c-diff" [fa521aa6e5] (rid 253452) by chw on 2026-05-13 20:24:35.
Ticket change [f38f4643ef] (rid 253459) by apnadkarni on 2026-05-14 10:39:54:
- icomment:
Thanks, Christian. I am a bit under the gun to get TIP's in before May 27. But will take a look after if no one else does. (I'm presuming you do not have commit privileges yourself.)
- login: "apnadkarni"
- mimetype: "text/plain"
- icomment:
Ticket change [768e8b2c62] (rid 253460) by chw on 2026-05-14 15:38:00:
- icomment:
Howdy Ashok, NP, take your time for real important work. This issue isn't pressing at all.
- login: "chw"
- mimetype: "text/plain"
- icomment:
Ticket change [0d467872a7] (rid 253682) by apnadkarni on 2026-05-20 08:06:52:
- icomment:
@chw, unfortunately, patch did not fix the problem. Instead, I'm now calling `Tcl_UnsetVar2` which will invoke a recursive trace but I don't think that is a problem. Proposed implementation in [bug-b492c33154](https://core.tcl-lang.org/tcl/timeline?r=bug-b492c33154)
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [e4a6efa392] (rid 253704) by chw on 2026-05-21 03:44:55:
- icomment:
Ashok, I see, you're right. The unset will perform the real work of clearing out the environment variable in a second trace firing.
- login: "chw"
- mimetype: "text/plain"
- icomment:
Ticket change [980a7d3bd5] (rid 253726) by apnadkarni on 2026-05-21 08:16:12:
- closedate changed to: "2461181.8445894676"
- closer changed to: "apnadkarni"
- icomment: "Fixed in [8e0656d976] for 9.0.4"
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"