BluesparkLabs / spark

✨ Toolkit to develop, test and run Drupal websites.
MIT License
2 stars 1 forks source link

Make .env file optional. Fixes #19 #21

Closed jameswilson closed 6 years ago

jameswilson commented 6 years ago

Fix for #19

balintbrews commented 6 years ago

Thanks @jameswilson, this is great. I would have liked to have something outputted about the fact that there was no .env file found, but I realized that messages are suppressed from that constructor (for reasons unknown to me), so let's just move on.

jameswilson commented 6 years ago

I realized that messages are suppressed from that constructor (for reasons unknown to me),

@balintk Yep. And apparently we cannot call other Tasks in the constructor either. This is a huge limitation with Robo. 😞 I hit this exact issue with the constructor in the DrushCommands.php file when wanting to use the Docker PS command to set the isContainer from the constructor, and ultimately had to refactor it to move everything to a prepare() function that must be called first thing from inside each command. Very frustrating.