Attachment Converter currently just assumes that all of its OS-level dependencies are installed, so for example, if it is run on an email containing a JPEG attachment and vips isn't installed, it will try to run vips anyway and we're in the wild west of uncaught exceptions. What it needs to do verify that all OS-level dependencies are installed when it is run and refuse to do anything if it can't find any of them, printing an error message describing which utilities need to be installed.
We'll eventually need to take a careful look at all of Attachment Converter's OS-level dependencies, but for a first stab, we can write code that:
examines the configuration the application is run using
checks that it can find something at every binary path indicated in the configuration file
if it fails to find anything, don't run
instead, print out a message telling the user to install whichever applications it can't find
Prelude contains some helpful library functions to check whether OS-level dependencies are installed. I will post more information about that in a follow-up on this issue.
Attachment Converter currently just assumes that all of its OS-level dependencies are installed, so for example, if it is run on an email containing a JPEG attachment and
vips
isn't installed, it will try to runvips
anyway and we're in the wild west of uncaught exceptions. What it needs to do verify that all OS-level dependencies are installed when it is run and refuse to do anything if it can't find any of them, printing an error message describing which utilities need to be installed.We'll eventually need to take a careful look at all of Attachment Converter's OS-level dependencies, but for a first stab, we can write code that:
Prelude
contains some helpful library functions to check whether OS-level dependencies are installed. I will post more information about that in a follow-up on this issue.