Add debug logging for loading .env files
WHY are these changes introduced?
I just spent 2+ hours trying to debug why I was receiving a 401 when running shopify theme dev. I understood from the debug logging that my Admin API session was invalid and https://theme-kit-access.shopifyapps.com/cli/admin/api/unstable/themes.json was failing, but even after running shopify auth logout I was not being prompted to login via browser (as I normally do).
Finally after adding some additional logging, I found that $SHOPIFY_CLI_THEME_TOKEN was being set. I had forgotten that I had created a .env file several weeks ago and it was setting the --password flag in this case
WHAT is this pull request doing?
Just knowing that a .env file is being loaded would have probably saved me a few hours of debugging. One-liner log to let people know that an .env file was found and being loaded.
Measuring impact
How do we know this change was effective? Please choose one:
- [x] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
- [ ] Existing analytics will cater for this addition
- [ ] PR includes analytics changes to measure impact
Checklist
- [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
- [x] I've considered possible documentation changes
CLA signed -- can you please re-run the status check?
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
This is still relevant -- let's get it merged team!