<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/backup.sh</string>
</array>
Running /usr/local/bin/backup.sh
requires access to ~/Documents
.
My gut feeling is I have to allow an app in "Security & Privacy", but which one and is that secure?
Best Answer
The following worked!
I created an app using "Script Editor" that runs
/usr/local/bin/borg-backup.sh
usingzsh
.I then exported the app to
/Applications/borg-backup.app
clicking "File" then "Export..." choosing "Application" for "File Format".Finally, I updated
~/Library/LaunchAgents/local.borg-backup.plist
.The first time the launch agent ran, a prompt asked me to grant
borg-backup.app
access to~/Documents
.