terra-ops / terra-cli

The Terra Command Line Interface
http://terra.readthedocs.org
GNU General Public License v2.0
48 stars 17 forks source link

Only run enable_first build commands the first time an env is enabled #85

Open jlyon opened 8 years ago

jlyon commented 8 years ago

https://github.com/terra-ops/terra-ui-prototype has

drush {{alias}} site-install standard --db-url=mysql://drupal:drupal@database/drupal -y

in the enable_first section of .terra.yml.

Currently on my localhost, re-enabling an existing environment runs these commands and my Drupal db gets wiped. Perhaps a flag isn't getting set properly somewhere?

jonpugh commented 8 years ago

Yeah... I never finished this part!

We need some way to detect that the environment has never been enabled before! I am not sure how yet, would love help on this, and should probably just revert back to "enable" to not make people think they are safe to have this hook reinstall the site.

jlyon commented 8 years ago

How about checking if drush status throws errors?