MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / find_binary

Function find_binary

benches/memory_usage.py:583–598  ·  view source on GitHub ↗

Try to find the phpantom_lsp binary.

()

Source from the content-addressed store, hash-verified

581
582
583def find_binary() -> str | None:
584 """Try to find the phpantom_lsp binary."""
585 # Check common locations.
586 candidates = [
587 "target/release/phpantom_lsp",
588 ]
589 for c in candidates:
590 if os.path.isfile(c) and os.access(c, os.X_OK):
591 return c
592
593 # Check PATH.
594 which = shutil.which("phpantom_lsp")
595 if which:
596 return which
597
598 return None
599
600
601def main() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected