mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-20 08:37:42 +02:00
[Haik]: ckpt, abstracted helpers within NineRouterProcess
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
import shutil
|
||||
from typing import Optional
|
||||
from typeguard import typechecked
|
||||
|
||||
|
||||
@typechecked
|
||||
def find_node() -> Optional[str]:
|
||||
node: Optional[str] = shutil.which("node")
|
||||
if node:
|
||||
return node
|
||||
electron_path: Optional[str] = os.environ.get("OPENSWARM_ELECTRON_PATH")
|
||||
if electron_path and os.path.exists(electron_path):
|
||||
return electron_path
|
||||
return None
|
||||
Reference in New Issue
Block a user