PracticalWeb Ltd

Websites that work for you.

Drush “Tput: No Value for $TERM and No -T Specified”

The drush script which provides comman line acceess to drupal functionality emits an error message when run as a cron job

tput: No value for $TERM and no -T specified

If it is not exported determine and export the number of columns.

if [ -z $COLUMNS ]; then export COLUMNS=$(tput cols) fi

I presume drush uses this information to calculate layout of output.

However when running as a cron job COLUMNS is not set and tput gives the above error.

To resolve this specify a COLUMNS value in your cron job, setting an appropriate size for viewing in email

cron now runs the following for me.


cd /var/www/mysite/public_html

COLUMNS=80 /home/me/bin/drush cron