Invoke seems to be clever enough that I can be in any subdirectory and call an invoke task. However I'm wondering how to ensure that the tasks run the same way without a lot of path massaging.
So for example, my structure is
code/
code/server/
code/tasks/build.py
I usually run inv build.test
from the code/
directory which then does the following:
with c.cd('server/'):
c.run('python manage.py test')
However if I'm in code/server/
I can also run inv build.run
and while it's nice that it finds the task definition, obviously it fails because it can't cd server/
.
Is there a clean way to handle this other than splicing paths together?