Skip to content

taskw fails when taskrc has environment variables #174

Description

@austb

Taskrc supports environment variables in it config https://taskwarrior.org/docs/man/taskrc.5/

Note that environment variables are also expanded in paths (and any other taskrc variables).

This error is from a bugwarrior-pull

Traceback (most recent call last):
File "/home/austb/.local/bin/bugwarrior-pull", line 7, in <module>
sys.exit(pull())
^^^^^^
...
File "/home/austb/.local/share/pipx/venvs/bugwarrior/lib/python3.11/site-packages/taskw/taskrc.py", line 57, in __init__
config = self._read(self.path)
^^^^^^^^^^^^^^^^^^^^^
File "/home/austb/.local/share/pipx/venvs/bugwarrior/lib/python3.11/site-packages/taskw/taskrc.py", line 105, in _read
TaskRc(right.strip())
File "/home/austb/.local/share/pipx/venvs/bugwarrior/lib/python3.11/site-packages/taskw/taskrc.py", line 57, in __init__
config = self._read(self.path)
^^^^^^^^^^^^^^^^^^^^^
File "/home/austb/.local/share/pipx/venvs/bugwarrior/lib/python3.11/site-packages/taskw/taskrc.py", line 95, in _read
with open(path, 'r') as config_file:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '$HOME/.config/task/$AUSTB_HOSTNAME_SHORT/bugwarrior-uda.conf'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions