mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added ability to pass environment variables
This commit is contained in:
parent
0b9f9450f6
commit
5fc7307be6
1 changed files with 6 additions and 0 deletions
|
|
@ -28,6 +28,12 @@ def main(input_json_path):
|
|||
with open(input_json_path, "r") as stream:
|
||||
data = json.load(stream)
|
||||
|
||||
# Change environment variables
|
||||
env = data.get("env") or {}
|
||||
for key, value in env.items():
|
||||
os.environ[key] = value
|
||||
|
||||
# Prepare launch arguments
|
||||
args = data["args"]
|
||||
if isinstance(args, list):
|
||||
args = subprocess.list2cmdline(args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue