fix: openclaw runtime error#7709
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Barecheck - Code coverage reportTotal: 21.79%Your code coverage diff: 0.00% ▴ ✅ All code changes are covered |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
src-tauri/src/core/openclaw/mod.rs:80
- This directory rename/migration logic is user-data dependent and easy to regress across platforms. Consider adding a small unit test in
src-tauri/src/core/openclaw/tests.rsthat validatesget_openclaw_runtime_dir()chooses the expected directory (and any fallback/migration behavior you implement), so the “missing runtime” fix is covered going forward.
/// OpenClaw runtime directory (where Bun and OpenClaw are installed)
pub fn get_openclaw_runtime_dir() -> Result<std::path::PathBuf, String> {
let base = get_openclaw_base_dir()?;
let runtime_dir = base.join("bunx");
if !runtime_dir.exists() {
std::fs::create_dir_all(&runtime_dir).map_err(|e| e.to_string())?;
}
Ok(runtime_dir)
src-tauri/src/core/openclaw/mod.rs:80
get_openclaw_runtime_dir()now points atopenclaw/bunxinstead of the previousopenclaw/runtime. If existing installs/data live under the old directory, they will no longer be discovered and may cause unnecessary reinstalls or “missing runtime” behavior. Consider a migration/fallback (e.g., ifbunxis empty butruntimeexists, use/move it) and update nearby docs/comments that still refer to “openclaw-runtime”.
/// OpenClaw runtime directory (where Bun and OpenClaw are installed)
pub fn get_openclaw_runtime_dir() -> Result<std::path::PathBuf, String> {
let base = get_openclaw_base_dir()?;
let runtime_dir = base.join("bunx");
if !runtime_dir.exists() {
std::fs::create_dir_all(&runtime_dir).map_err(|e| e.to_string())?;
}
Ok(runtime_dir)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Describe Your Changes
Fixes Issues
Self Checklist