Spaces:
Sleeping
Sleeping
Claude Code Claude Opus 4.6 commited on
Commit ·
30ce3dc
1
Parent(s): 99bbfbe
Claude Code: Fix cain_status.json path resolution for Docker container
Browse files- Remove incorrect nested path /app/openclaw/.openclaw/agents/
- Add correct /app/.openclaw/ path that matches Docker WORKDIR
- Update absolute path search to use /app/.openclaw/ instead of nested version
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- error_handlers.py +5 -4
error_handlers.py
CHANGED
|
@@ -69,11 +69,12 @@ def _resolve_status_file() -> Path:
|
|
| 69 |
return candidate
|
| 70 |
|
| 71 |
# Priority 2: Search relative to this script's location
|
|
|
|
| 72 |
script_dir = Path(os.path.dirname(__file__))
|
| 73 |
relative_paths = [
|
| 74 |
-
script_dir / "cain_status.json",
|
| 75 |
-
script_dir / ".openclaw" / "
|
| 76 |
-
script_dir / "
|
| 77 |
script_dir.parent / "cain_status.json",
|
| 78 |
]
|
| 79 |
for candidate in relative_paths:
|
|
@@ -81,7 +82,7 @@ def _resolve_status_file() -> Path:
|
|
| 81 |
return candidate
|
| 82 |
|
| 83 |
# Priority 3: Common absolute locations
|
| 84 |
-
for base in ["./cain_status.json", "/app/cain_status.json", "/app/
|
| 85 |
candidate = Path(base)
|
| 86 |
if candidate.exists():
|
| 87 |
return candidate
|
|
|
|
| 69 |
return candidate
|
| 70 |
|
| 71 |
# Priority 2: Search relative to this script's location
|
| 72 |
+
# Docker WORKDIR is /app, so script_dir will be /app
|
| 73 |
script_dir = Path(os.path.dirname(__file__))
|
| 74 |
relative_paths = [
|
| 75 |
+
script_dir / "cain_status.json", # /app/cain_status.json
|
| 76 |
+
script_dir / ".openclaw" / "cain_status.json", # /app/.openclaw/cain_status.json
|
| 77 |
+
script_dir / ".openclaw" / "agents" / "cain_status.json", # /app/.openclaw/agents/cain_status.json
|
| 78 |
script_dir.parent / "cain_status.json",
|
| 79 |
]
|
| 80 |
for candidate in relative_paths:
|
|
|
|
| 82 |
return candidate
|
| 83 |
|
| 84 |
# Priority 3: Common absolute locations
|
| 85 |
+
for base in ["./cain_status.json", "/app/cain_status.json", "/app/.openclaw/cain_status.json", "/data/cain_status.json"]:
|
| 86 |
candidate = Path(base)
|
| 87 |
if candidate.exists():
|
| 88 |
return candidate
|