Skip to content

Commit

Permalink
Ignore the FLATC_EXECUTABLE env var when empty
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dbort committed May 14, 2024
1 parent 0e7955d commit 1ed61d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exir/_serialize/_flatbuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def _run_flatc(args: Sequence[str]) -> None:
subprocess.run([flatc_path] + list(args), check=True)
else:
# Expect the `flatc` tool to be on the system path or set as an env var.
flatc_path = os.getenv("FLATC_EXECUTABLE", "flatc")
flatc_path = os.getenv("FLATC_EXECUTABLE")
if not flatc_path:
flatc_path = "flatc"
subprocess.run([flatc_path] + list(args), check=True)


Expand Down

0 comments on commit 1ed61d4

Please sign in to comment.