From fa524138c670ffff123e92a46c50dd1071e145f0 Mon Sep 17 00:00:00 2001 From: syui Date: Sat, 9 Aug 2025 18:02:09 +0900 Subject: [PATCH] fix home dir --- src/mcp/claude_proxy.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mcp/claude_proxy.rs b/src/mcp/claude_proxy.rs index 25727a8..30d6081 100644 --- a/src/mcp/claude_proxy.rs +++ b/src/mcp/claude_proxy.rs @@ -70,9 +70,13 @@ async fn communicate_with_claude_mcp( // Claude Code MCPプロセスを起動 // Use the full path to avoid shell function and don't use --continue 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 { - claude_code_path + claude_code_path.to_string() }; let mut child = tokio::process::Command::new(claude_executable)