Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tasklib/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def __init__(self, data_location=None, create=True,
version_override=None):
self.taskrc_location = None
if taskrc_location:
self.taskrc_location = os.path.expanduser(taskrc_location)
self.taskrc_location = os.path.expandvars(taskrc_location)
self.taskrc_location = os.path.expanduser(self.taskrc_location)

# If taskrc does not exist, pass / to use defaults and avoid creating
# dummy .taskrc file by TaskWarrior
Expand All @@ -121,6 +122,7 @@ def __init__(self, data_location=None, create=True,

# Set data.location override if passed via kwarg
if data_location is not None:
data_location = os.path.expandvars(data_location)
data_location = os.path.expanduser(data_location)
if create and not os.path.exists(data_location):
os.makedirs(data_location)
Expand Down