Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
with _connect() as conn:
create_schema(conn)
elif args.command == "jixia":
if not os.environ.get("JIXIA_PATH"):
raise SystemExit(
"JIXIA_PATH is not set. It must point at the jixia binary, e.g. "
"jixia/.lake/build/bin/jixia"
)

Check failure on line 64 in database/__init__.py

View workflow job for this annotation

GitHub Actions / lint

ruff (unformatted)

database/__init__.py:61:30: unformatted: File would be reformatted
# jixia runs each module with cwd=project_root, so the module file
# path must be absolute — a relative root would be resolved twice.
project = LeanProject(os.path.abspath(args.project_root))
Expand Down
6 changes: 5 additions & 1 deletion database/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
filemode=os.environ.get("LOG_FILEMODE", "a"),
level=os.environ.get("LOG_LEVEL", "INFO"),
)
jixia.run.executable = os.environ["JIXIA_PATH"]
# Only the `jixia` subcommand shells out to the analyzer binary. Requiring this
# at import time breaks `schema`, `informal`, and `vector-db`, which never touch
# it; that subcommand validates the variable itself.
if os.environ.get("JIXIA_PATH"):
jixia.run.executable = os.environ["JIXIA_PATH"]

main()
Loading