Skip to content

Error when executing a shell script in Automator that works fine in Terminal

  • by


I am trying to create an Automator Quick Action that will extract subtitles from a .mp4 file via a shell script when selected from the Finder. When I run the command in Terminal, it executes properly and creates a .srt file.

mp4box -srt 3 ~/Users/me/Downloads/file.mp4

At first, the Quick Action would return an error: The action “Run Shell Script” encountered an error: “zsh:1: command not found: mp4box”

After doing some research, I inserted the following line:
export PATH=/usr/local/bin:$PATH

Now I get this error: The action “Run Shell Script” encountered an error: “[31mBroken argument specifier or file name missing – check usage with -h [0m”

Second Finder error message

Here is my Automator Quick Action setup:

Automator Quick Action script

What am I missing/doing wrong?

Leave a Reply

Your email address will not be published. Required fields are marked *