Closed ryanwarsaw closed 7 years ago
cc: @gideonthomas @cadecairos R+?
R+ on my side
I'm pretty sure the pre-install
script is run on heroku as well. Won't this then use what's in sample.env over what's in the actual env?
Good point! Easy enough to fix though: this is a node script, so we can simply add an if (process.env.NODE_ENV === "production") process.exit(0);
@Pomax @gideonthomas Thanks for catching that, i went ahead and made the review changes requested, and learned a lot about Node's process API and environment-related stuff 👀 R+?
I also wanted to pick your brains on a question related to styling and JS, I'm used to working with languages like Java where there are several prominent standards (Google & Oracle's guides). However, with JS it seems to be much more diverse and spread out across the board. Is there a prominent standard with JS, or is it one of those things where as long as it passes lint it's okay?
🤔 ðŸ’
I just realized I have to check for staging
as well, I'm going to do it in the morning since it's 1 AM and I can't think straight. 😴
@ryanwarsaw you can just check for a NODE_ENV
var at all. If there is one, don't do anything, because whoever has that set clearly has special intentions.
@Pomax R+?
@Pomax R+? Thanks for the reviews.
yup R+
This verifies that the .env file has been copied before trying to run the post-install script.