From 72854686ba73783ccf5a96a2c89bc38c55c6afad Mon Sep 17 00:00:00 2001 From: Austin Blatt Date: Tue, 26 Aug 2025 07:19:45 -0700 Subject: [PATCH] expand env vars in taskrc include paths Taskwarrior supports expanding environment variables in the taskrc config. Without expanding environment variables, taskw will fail to find the correct file to read. Fixes #174. --- taskw/taskrc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/taskw/taskrc.py b/taskw/taskrc.py index 1b6f8e5..9ad0c72 100644 --- a/taskw/taskrc.py +++ b/taskw/taskrc.py @@ -50,8 +50,10 @@ def __init__(self, path=None, overrides=None): self.overrides = overrides if overrides else {} if path: self.path = os.path.normpath( - os.path.expanduser( - path + os.path.expandvars( + os.path.expanduser( + path + ) ) ) config = self._read(self.path)