Line endings can be a PITA when working with shell scripts on Linux, unfortunately it’s Linux itself that’s producing such an uninformative error.
Running on a Linux machine, and changing a script to DOS line endings;
./script.sh
bash: ./script.sh: /bin/sh^M: bad interpreter: No such file or directory
We’re working on trying to improve that error message (at least to try including which file caused the error)