Skip to content

Commit 36f787c

Browse files
Fix passing env to executor cmd
1 parent c48ea12 commit 36f787c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

backends/nxp/tests_models/executors.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import subprocess
1212
from copy import deepcopy
1313
from enum import Enum
14-
from os import mkdir
14+
from os import environ, mkdir
1515
from typing import Callable
1616

1717
import numpy as np
@@ -593,7 +593,8 @@ def _get_caller_name():
593593

594594

595595
def execute_cmd(cmd, cwd="."):
596-
env = {"LD_LIBRARY_PATH": NSYS_PATH.parent}
596+
env = environ.copy() # Copy the current environment
597+
env["LD_LIBRARY_PATH"] = str(NSYS_PATH.parent)
597598

598599
with subprocess.Popen(
599600
cmd,

0 commit comments

Comments
 (0)