Running shell scripts in Shortcuts app - can't select "Shortcut input" option
I'm using the MacOS Shortcuts app to create a Finder Quick Action that runs a shell script to run ExifTool. But I can't select the input to my shell script using the Input dropdown. Every time I choose the "Shortcut input" option from the dropdown, it disappears (i.e. doesn't stay selected but resets to blank).
- ExifTool is installed and working on my system (via Brew).
- Action is set to receive media files Input (Images, media files, PDF) from Quick Actions
- The Privacy tab options are set to "allow this shortcut to access Shell", and "Allow Run Shell Script to access Finder"
- Next in sequence is the Run Shell Script action. Shell is set to "zsh", Pass Input is set to "as arguments".
- The shell script is as follows (calls exiftool on selected files to remove EXIF metadata):
for f in "$@"
do
exiftool -all= -overwrite_original "$f"
done
When I attempt to run the shortcut, I get an error. "command not found: exiftool"
Running "exiftool -all= somefilename.jpg in Terminal works just fine.
un/checking Run as Administrator makes no difference.
See attached image for shortcut setup:
MacBook Pro 14″, macOS 14.5