fix: respect pre-existing .env files when preparing the herokuish buildenv

Closes #4894
This commit is contained in:
Jose Diaz-Gonzalez
2022-01-18 02:20:57 -05:00
parent 3c68114ad3
commit 07f2ef1411
4 changed files with 32 additions and 3 deletions

1
tests/apps/python/.env Normal file
View File

@@ -0,0 +1 @@
DOTENV_KEY=some_value

View File

@@ -5,7 +5,10 @@ import os
def main():
print("GLOBAL_SECRET: {0}".format(os.getenv('GLOBAL_SECRET')))
print("SECRET_KEY: {0}".format(os.getenv('SECRET_KEY')))
with open("/app/.env", "r") as f:
for line in f.readlines():
if "DOTENV_KEY" in line:
print(line)
if __name__ == '__main__':
main()