MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / bin_path

Function bin_path

archivebox/config.py:853–861  ·  view source on GitHub ↗
(binary: Optional[str])

Source from the content-addressed store, hash-verified

851 return None
852
853def bin_path(binary: Optional[str]) -> Optional[str]:
854 if binary is None:
855 return None
856
857 node_modules_bin = Path('.') / 'node_modules' / '.bin' / binary
858 if node_modules_bin.exists():
859 return str(node_modules_bin.resolve())
860
861 return shutil.which(str(Path(binary).expanduser())) or shutil.which(str(binary)) or binary
862
863def bin_hash(binary: Optional[str]) -> Optional[str]:
864 if binary is None:

Callers 5

config.pyFile · 0.85
bin_versionFunction · 0.85
bin_hashFunction · 0.85
get_dependency_infoFunction · 0.85
get_chrome_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected