MCPcopy Create free account
hub / github.com/StarsTom/mobileCodexHelper / resolve_workspace

Function resolve_workspace

mobile_codex_control.py:38–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37
38def resolve_workspace() -> Path:
39 candidates = []
40 if getattr(sys, "frozen", False):
41 executable_dir = Path(sys.executable).resolve().parent
42 candidates.extend([executable_dir, executable_dir.parent, executable_dir.parent.parent])
43 else:
44 source_dir = Path(__file__).resolve().parent
45 candidates.extend([source_dir, source_dir.parent])
46
47 for candidate in candidates:
48 if (candidate / "scripts" / "start-mobile-codex-stack.ps1").exists():
49 return candidate
50
51 return Path(__file__).resolve().parent
52
53
54WORKSPACE = resolve_workspace()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected