Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2c26eab5120a37f2e614fcf9a09bd1ae1b12568cc564637c16f2aa91d086a8f1
Ticket: 55a02f20ec10f1bf1b8b2b23f1a791431842067e
Failure to set HOME when run via task scheduler or service (Windows)
User & Date: apnadkarni on 2022-08-06 06:06:09
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    Tilde expansion in file commands use `env(HOME)`. At startup this is initialized from the `HOME` env variable or via `HOMEDRIVE` and `HOMEPATH` if `HOME` is not set. However, under some circumstances none of these are set on Windows, examples being when the program is started from the task scheduler or as a service and the corresponding user account has not logged in. This causes tilde expansion to fail.
    
    The proposed fix is to fallback to initializing `HOME` with the `USERPROFILE` env var if the current method fails. This seems to exist in all cases.
    
    Classifying as bug so no TIP required :-) Please note any objections here.
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "apnadkarni"
  13. subsystem changed to: "08. Environment Variables"
  14. title changed to:
    Failure to set HOME when run via task scheduler or service (Windows)
    
  15. type changed to: "Bug"