Problem/Motivation
On my local development environment, the exiftool command fails with the following error:
sh: line 0: exec: exiftool: not found
I noticed this only happens when uploading a file through the UI, not when running drush metadata_sanitizer:clean.
Steps to reproduce
Upload a file through the UI, having #3570403: Hooks are not being triggered applied.
Proposed resolution
Add an option to define the full path where the executable can be found. When left empty, we should try some default paths.
Issue fork metadata_sanitizer-3570407
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dieterholvoet commentedComment #3
dieterholvoet commentedIn another issue the file sanitation logic should probably be moved to a service, to reduce duplication and to statically cache the executable path to make sure it's only being looked for once per request.
Comment #4
dieterholvoet commentedWe should probably also add a
hook_requirementsimplementation checking if the executable is available in any of the default or configured paths.Comment #5
zarabatana commentedThanks for tackling this! Could you open an MR from the issue-fork branch 3570407-add-option-to?
The core requirement is an exiftool_path setting (optional full path). If empty, we can still try PATH/default locations so UI uploads work even when the webserver PATH differs from Drush.
If you have time, it’d be great to reuse the same resolver for both the upload path and the Drush command, and use it for the status/requirements check too (to avoid duplication).
Comment #8
zarabatana commentedComment #9
zarabatana commentedMR !13 is now merged. This adds a configurable ExifTool executable path and default-path fallback, fixing the “exiftool: not found” error on UI uploads where the webserver PATH differs from Drush. The suggested service/refactor and requirements check can be handled in a follow-up. Marking fixed/closing.
Comment #11
zarabatana commented