We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b4cca3 commit f61c0a3Copy full SHA for f61c0a3
lambda_local/environment_variables.py
@@ -2,6 +2,11 @@
2
import os
3
4
5
+def export_variables(environment_variables):
6
+ for env_name, env_value in environment_variables.items():
7
+ os.environ[str(env_name)] = str(env_value)
8
+
9
10
def set_environment_variables(json_file_path):
11
"""
12
Read and set environment variables from a flat json file.
@@ -25,5 +30,4 @@ def set_environment_variables(json_file_path):
25
30
with open(json_file_path) as json_file:
26
31
env_vars = json.loads(json_file.read())
27
32
28
- for env_name, env_value in env_vars.items():
29
- os.environ[str(env_name)] = str(env_value)
33
+ export_variables(env_vars)
0 commit comments