fix(hanzo-mcp): v0.10.1 - improve shell resolution

- Check Homebrew paths first (/opt/homebrew/bin, /usr/local/bin)
- Prefer zsh, fallback to bash if not available
- Support both Apple Silicon and Intel Macs
This commit is contained in:
2025-12-25 17:47:09 -08:00
parent fe35677866
commit 4e90aff2ae
3 changed files with 31 additions and 6 deletions
@@ -111,10 +111,35 @@ class DagTool(BaseTool):
self.default_shell = self._resolve_shell(default_shell)
def _resolve_shell(self, preferred: str) -> str:
"""Resolve shell - zsh only."""
for path in ["zsh", "/bin/zsh", "/usr/bin/zsh"]:
if shutil.which(path):
return path
"""Resolve shell - prefer zsh, fallback to bash.
Search order:
1. Homebrew paths (Apple Silicon + Intel)
2. Standard system paths
3. PATH lookup
"""
# Prefer zsh, then bash
shell_priority = ["zsh", "bash"]
# Homebrew + system paths
search_paths = [
"/opt/homebrew/bin", # Apple Silicon Homebrew
"/usr/local/bin", # Intel Homebrew
"/bin", # System
"/usr/bin", # System
]
for shell in shell_priority:
# Check explicit paths first
for prefix in search_paths:
full_path = f"{prefix}/{shell}"
if os.path.isfile(full_path) and os.access(full_path, os.X_OK):
return full_path
# Fallback to PATH lookup
found = shutil.which(shell)
if found:
return found
return "sh" # Bare minimum fallback
@property
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "hanzo-mcp"
version = "0.10.0"
version = "0.10.1"
description = "The Zen of Hanzo MCP: One server to rule them all. The ultimate MCP that orchestrates all others."
readme = "README.md"
requires-python = ">=3.12"
+1 -1
View File
@@ -1232,7 +1232,7 @@ wheels = [
[[package]]
name = "hanzo-mcp"
version = "0.10.0"
version = "0.10.1"
source = { editable = "." }
dependencies = [
{ name = "aiofiles" },