feat: Node.js path scanning + manual path input + git HTTPS auto-fix (v0.4.2)

- Add scan_node_paths: auto-scan C/D/E/F/G drives for Node.js installations
- Add check_node_at_path: verify Node.js at user-specified directory
- Add save_custom_node_path: persist custom path to ~/.openclaw/clawpanel.json
- enhanced_path() now loads saved custom path and applies to all commands
- Windows enhanced_path: scan Program Files, LOCALAPPDATA, APPDATA, common drives
- Auto git config HTTPS-instead-of-SSH before npm install (fixes exit 128)
- Setup page: auto-scan button + manual path input when Node.js not detected
- Error diagnosis: add EPERM, MODULE_NOT_FOUND, SSH publickey patterns
- README: expanded troubleshooting section
This commit is contained in:
晴天
2026-03-05 22:30:19 +08:00
parent b1b95e5a11
commit 6ca4267970
14 changed files with 382 additions and 42 deletions

View File

@@ -10,6 +10,7 @@ pub fn openclaw_command() -> std::process::Command {
const CREATE_NO_WINDOW: u32 = 0x08000000;
let mut cmd = std::process::Command::new("cmd");
cmd.arg("/c").arg("openclaw");
cmd.env("PATH", crate::commands::enhanced_path());
cmd.creation_flags(CREATE_NO_WINDOW);
cmd
}
@@ -28,6 +29,7 @@ pub fn openclaw_command_async() -> tokio::process::Command {
const CREATE_NO_WINDOW: u32 = 0x08000000;
let mut cmd = tokio::process::Command::new("cmd");
cmd.arg("/c").arg("openclaw");
cmd.env("PATH", crate::commands::enhanced_path());
cmd.creation_flags(CREATE_NO_WINDOW);
cmd
}