Script doesn't work since Mojave Update

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
axemangraphics
Posts: 2
Joined: Fri Nov 09, 2018 6:45 am

Script doesn't work since Mojave Update

Post by axemangraphics » Fri Nov 09, 2018 7:06 am

I had somehow managed to piece together a script to convert various video files, and it worked well... Then I updated to Mojave, and since then, nothing. The Automator script for CLI flicks on, then closes straight away, with no output files. Again, this script has worked for ~2 years before the Mojave update...
GUI version can smash out files no problem, but the CLI? no such luck... Am I missing something obvious in the script below??


The script that was used is this


for f in "$@"
do
/Applications/HandBrakeCLI -i "$f" -o "/Users/axemangraphics/Desktop/• Movies to Convert/• TO NAME/ $(basename $f).mp4"
done



HandBrake version 1.1.2, with the latest CLI version :

MacOS Mojave 10.14.1 :

I cannot provide a log, as Automator does not run for long enough! I have logs of files that run just fine under the GUI version, if that helps? (doubt it)

Woodstock
Veteran User
Posts: 2765
Joined: Tue Aug 27, 2013 6:39 am

Re: Script doesn't work since Mojave Update

Post by Woodstock » Fri Nov 09, 2018 1:25 pm

Mojave, like updates before it, changed the rules on some permissions. A quick search on "mac os automator fails on mojave" comes up with articles like https://bitsplitting.org/2018/07/11/rea ... in-mojave/ explaining how to make scripts work again.

axemangraphics
Posts: 2
Joined: Fri Nov 09, 2018 6:45 am

Re: Script doesn't work since Mojave Update

Post by axemangraphics » Fri Nov 09, 2018 1:44 pm

thank you Woodstock!
I also found another post regarding the "Get Folder Contents" portion of Automator, which no longer works for whatever reason. I removed that section, and things lit up!
It now has:
"Get Selected Finder Items"
"Filter Finder Items" (This is to single out video files, AVI, MKV, MPV, MPG, etc
"Reveal Finder Items"
"Run Shell Script"

for f in "$@"
do
/Applications/HandBrakeCLI -i "$f" -o "/Users/axemangraphics/Desktop/• Movies to Convert/• TO NAME/ $(basename $f).mp4"
done

The script itself was fine, but the Automator portion before it was the issue (as well as a permissions box that was not displaying until I removed the "Get Folder Items" option... then the Security Permissions box popped up, and things started happening, just like they used to!

Post Reply