Xbar/BitBar gives “Couldn’t Posix Spawn” for script.

Apple's quarantine system can cause this. Try xattr -d com.apple.quarantine /path/to/script.sh.