Skip to content

Commit 92c1f34

Browse files
authored
chore: Respect environment variables when calling check_call (#2741)
Signed-off-by: Achal Shah <achals@gmail.com>
1 parent c4b636f commit 92c1f34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ def _generate_python_protos(self, path: str):
249249
self.python_folder,
250250
]
251251
+ proto_files,
252+
env=os.environ
252253
)
253254

254255
def run(self):
@@ -334,6 +335,8 @@ def _generate_go_protos(self, path: str):
334335
proto_files = glob.glob(os.path.join(self.proto_folder, path))
335336

336337
try:
338+
e = os.environ.copy()
339+
e["PATH"] = self.path_val
337340
subprocess.check_call(
338341
self.go_protoc
339342
+ [
@@ -347,7 +350,7 @@ def _generate_go_protos(self, path: str):
347350
"--go-grpc_opt=module=github.com/feast-dev/feast/go/protos",
348351
]
349352
+ proto_files,
350-
env={"PATH": self.path_val},
353+
env=e,
351354
)
352355
except CalledProcessError as e:
353356
print(f"Stderr: {e.stderr}")

0 commit comments

Comments
 (0)