My sites are running Drupal 7, Drush 8.0.3.
I'm creating a dashboard to check what core and module versions my Drupal sites are running (they're all on the same server). I use a shell script to get Drush to check available updates, write them to a JSON file then my dashboard script reads the JSON file.
/usr/local/bin/drush --root=/home/www/html/www.mysite.com rf
/usr/local/bin/drush --root=/home/www/html/www.mysite.com ups --security-only --format=json > /home/www/html-private/mysite.json
This works fine but the problem I have is that when there are no updates available I get an empty JSON file. How can I tell the difference between this and a failure to write the JSON properly? Can I get it to output 'No updates available' or something so I can tell it ran correctly?