macedotavares / obsidian-utilities

An Alfred workflow focusing on quick entry and logging.
https://github.com/macedotavares/obsidian-utilities
GNU General Public License v3.0
169 stars 7 forks source link

If python3 isn't found, Tasks.md is erased #7

Closed heliostatic closed 3 years ago

heliostatic commented 3 years ago

In the Run Script step of task adding, if #!/usr/bin/env python3 fails, the whole file is erased. We should test for it at the beginning of the flow and fail without data loss if it isn't present.

[16:00:32.288] ERROR: Obsidian Utilities[Run Script] env: python3: No such file or directory

Related issue: can't figure out why it's failing to find python3, but that's probably my issue :)

macedotavares commented 3 years ago

Thanks for reporting this.

The latest version now points all python scripts to usr/bin/python3, precisely because I shouldn't have relied on python environments across machines. Please update the workflow and see if the problem persists.

Anyway, I'll have to find a way of making it fail less catastrophically.