openreplay/ee/api/env_handler.py
KRAIEM Taha Yassine d6e9d5dc0a Changes:
- changed env-handler logic
2021-05-12 19:05:33 +02:00

11 lines
431 B
Python

from os import environ
import json
with open('.chalice/config.json') as json_file:
data = json.load(json_file)
stages = data.get("stages", {})
for s in stages.keys():
data["stages"][s]["environment_variables"] = {**stages[s].get("environment_variables", {}), **environ}
with open('.chalice/config.json', 'w') as outfile:
json.dump(data, outfile, indent=2, sort_keys=True)
print("override config.json")