Open davidfischer-ch opened 8 years ago
I found that drush needs PATH to be set. Drush probably fail to find libraries / command line tools when PATH is set to a bare minimal value (empty or what cron set). I think Drush should fail with a message in such a case instead of returning an unexpected value.
I am writing a Python 3 script to automated the deployment of a Drupal website. The procedure calls
drush vget --format=json
to retrieve the website variables and iterate over it.I tested this script successfully but then when the script is called by cron the scripts failed to decode the output of
drush
. In fact I discovered that in that case the output is not a valid JSON string but a PHP representation of the array (key value)!I tested the command interactively using a python interactive shell and I discovered that when the environment variables (env) is empty then the drush command effectively behaves differently.
VS