Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook Error: Expected feedback from failing hook script (when using $XDG) #16

Closed
kaushikgopal opened this issue Oct 25, 2021 · 4 comments

Comments

@kaushikgopal
Copy link

I'm actually not entirely sure this is a task pirate issue (could actually just be a hooks + taskwarrior in general problem), but starting with an issue here, will move over to the right tool if folks have more input.

I recently moved to using XDG based directory structure for task warrior. I did this after upgrading to 2.6.1.

I notice this error happens only after one of my hooks (in this case the shift recurrence one) attempt to execute.

CleanShot 2021-10-25 at 11 33 34@2x

Some noteworthy environment variables:

task --version # 2.6.1

set --export XDG_CONFIG_HOME $HOME/.config
set --export XDG_DATA_HOME $HOME/.data

data.location=$XDG_DATA_HOME/task/
hooks.location=$XDG_CONFIG_HOME/task/hooks/

Another peculiar observation is that there were .data files being created in my ~/.config/task/ directory

CleanShot 2021-10-25 at 11 41 18@2x

Let me know if I can provide any more information or if I should instead open these in the main taskwarrior project.

@tbabej
Copy link
Owner

tbabej commented Oct 26, 2021

@kaushikgopal I think the problem here is that you're tasklib version is slightly out of date. For support for 2.6.0 or higher, you need to upgrade to tasklib 2.4, ideally the latest 2.4.3 release using pip.

@tbabej
Copy link
Owner

tbabej commented Oct 26, 2021

Note that XDG settings should be unrelated to this. The problem under the hood is slight CLI semantics change for task export command that happened in 2.6. and on which previous versions of tasklib unfortunately relied upon.

@kaushikgopal
Copy link
Author

kaushikgopal commented Oct 27, 2021

ahh.. that might be it. interestingly, my setup script had this for installation:

pip3 install --user git+git://github.com/tbabej/tasklib@develop

I think I used your version of tasklib (maybe for taskwiki at some point?) and assumed it was the latest version. I'll upgrade to the latest tasklib version and confirm.

@tbabej
Copy link
Owner

tbabej commented Oct 27, 2021

Got it. Those were indeed the official instructions at some point (when the official tasklib was not maintained frequently enough for me to be able to get my improvements in). Since then, several releases have been made, and the tasklib project was transferred over to GothenburgBitFactory org, so now I can make releases as well, ensuring the things are properly up to date.

TL;DR: That line can be replaced by just using the official tasklib release on PYPI 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants