3 ms·
It's a chronic problem on work projects that people write shell scripts without a shebang operator at the top. Obscure error messages are usually how I find out
by hinkley 6y ago
It's a chronic problem on work projects that people write shell scripts without a shebang operator at the top. Obscure error messages are usually how I find out someone is using zsh, fish, or some other shell.
I fix what I can, but it's like mopping up water during a rainstorm. Yes it's better than doing nothing, but also there will be more in twenty minutes so don't make any plans.
- azernik 6y agoOne way I force people (mostly myself) to include shebang lines: Have a scripts directory in my repo that mixes shell and python scripts with no file extensions and executable bits set. If I don't put a shebang, it just doesn't run. Of course, this requires you to have firm control of code style policies.
- maple3142 6y agoBut, does shebang works when you want to source some files?