I was having an issue with my BASH script when I ran the command: php composer.phar install. The error outputted this to STDERR:
No entry for terminal type "unknown";
using dumb terminal settings.
After a bit of digging around, I managed to fix it by adding this line of code to the beginning:
export TERM=dumb
Once I added that, it cleared the STDERR.