Skip to content

Commit 6c74717

Browse files
dbortmergennachin
authored andcommitted
Ignore the FLATC_EXECUTABLE env var when empty
We've seen some situations fail because flatc_path is an empty string. This seems like a likely culprit, but doesn't hurt either way.
1 parent 4cd0add commit 6c74717

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

exir/_serialize/_flatbuffer.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ def _run_flatc(args: Sequence[str]) -> None:
201201
subprocess.run([flatc_path] + list(args), check=True)
202202
else:
203203
# Expect the `flatc` tool to be on the system path or set as an env var.
204-
flatc_path = os.getenv("FLATC_EXECUTABLE", "flatc")
204+
flatc_path = os.getenv("FLATC_EXECUTABLE")
205+
if not flatc_path:
206+
flatc_path = "flatc"
205207
subprocess.run([flatc_path] + list(args), check=True)
206208

207209

0 commit comments

Comments
 (0)