Shortcut's Run Shell Script won't let me change Shell
I updated to MacOS Sonoma 14.6.1, and a Shortcut I use through Quick Actions errors out. I get this message:
/opt/local/bin/bash: /Users/neal/Library/Group Containers/group.com.apple.shortcuts/Temporary/ com.apple.WorkflowKit.BackgroundShortcutRunner/AB89F1C0-F082-4391-9F4C-ADA8BAC87ECD: Operation not permitted
I double-checked that the Finder.app, shortcuts.app, bash, and other cli apps have Full Disk Access.
I also checked that the bash I want to use is listed in /etc/shells. I checked the $BASH_VERSION and I'm using Bash 5.2.32(1)-release. I also ran chsh -s /opt/local/bin/bash.
When I select the Shell Bash path "/opt/local/bin/bash" in the Run Shell Script, it doesn't stick. The Shell parameter always stays on "/bin/bash", which is Bash 3.2.57(1)-release (very old).
How do I fix this? I used to work fine with no errors before I updated the MacOS.
UPDATE: All of my Shortcuts that use Run Shell Script fail. All of them are stuck on /bin/bash and not the desired /opt/local/bin/bash. Also note: If I change the Run Shell Script's Shell to /bin/zsh everything works fine. I want Bash, not Zsh.
Mac Studio