fix home dir
This commit is contained in:
@@ -70,9 +70,13 @@ async fn communicate_with_claude_mcp(
|
|||||||
// Claude Code MCPプロセスを起動
|
// Claude Code MCPプロセスを起動
|
||||||
// Use the full path to avoid shell function and don't use --continue
|
// Use the full path to avoid shell function and don't use --continue
|
||||||
let claude_executable = if claude_code_path == "claude" {
|
let claude_executable = if claude_code_path == "claude" {
|
||||||
"/Users/syui/.claude/local/claude"
|
// Use $HOME environment variable instead of hardcoded path
|
||||||
|
match std::env::var("HOME") {
|
||||||
|
Ok(home) => format!("{}/.claude/local/claude", home),
|
||||||
|
Err(_) => "/Users/syui/.claude/local/claude".to_string(), // fallback
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
claude_code_path
|
claude_code_path.to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut child = tokio::process::Command::new(claude_executable)
|
let mut child = tokio::process::Command::new(claude_executable)
|
||||||
|
Reference in New Issue
Block a user