fix: address maintainer review feedback on setup-macos.sh

Fix incorrect default Claude Desktop config path — macOS uses
~/Library/Application Support/Claude/claude_desktop_config.json,
not ~/.config/Claude/claude_desktop_config.json.

Capture stderr in merge_config subshell (2>&1) so Python tracebacks
and interpreter errors are surfaced instead of silently dropped when
the command substitution fails under set -e.

Update README.md and docs/PLATFORM_GUIDE.md to reflect the corrected
macOS config path, and split the combined Linux/macOS config location
reference into separate per-platform entries.

Add trailing newline at the end.
This commit is contained in:
nhebling
2026-04-11 21:10:14 +02:00
parent 0255064648
commit e28df51eb1
3 changed files with 8 additions and 7 deletions

View File

@@ -613,7 +613,7 @@ Specify a custom Claude Desktop configuration file.
Default: Default:
```text ```text
~/.config/Claude/claude_desktop_config.json ~/Library/Application Support/Claude/claude_desktop_config.json
``` ```
Example: Example:
@@ -667,7 +667,8 @@ Use the kicad MCP server to run check_kicad_ui.
Edit configuration file: Edit configuration file:
- **Linux/macOS:** `~/.config/Claude/claude_desktop_config.json` - **Linux:** `~/.config/Claude/claude_desktop_config.json`
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json` - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
**Configuration:** **Configuration:**

View File

@@ -483,7 +483,7 @@ bash setup-macos.sh --verify
**3. Claude Config Not Picked Up** **3. Claude Config Not Picked Up**
- Default path is `~/.config/Claude/claude_desktop_config.json` - Default path is `~/Library/Application Support/Claude/claude_desktop_config.json`
- Use `--claude-config` flag to point to a different location - Use `--claude-config` flag to point to a different location
- Fully quit and reopen Claude Desktop after changes - Fully quit and reopen Claude Desktop after changes

View File

@@ -22,7 +22,7 @@ Options:
--yes Do not prompt before writing (only with --apply) --yes Do not prompt before writing (only with --apply)
--name NAME MCP server name (default: kicad) --name NAME MCP server name (default: kicad)
--claude-config PATH Path to Claude Desktop config file --claude-config PATH Path to Claude Desktop config file
(default: ~/.config/Claude/claude_desktop_config.json) (default: ~/Library/Application Support/Claude/claude_desktop_config.json)
EOF EOF
} }
@@ -96,7 +96,7 @@ done
[[ -n "$SERVER_NAME" ]] || fail "Server name must not be empty" [[ -n "$SERVER_NAME" ]] || fail "Server name must not be empty"
if [[ -z "$CLAUDE_CONFIG_PATH" ]]; then if [[ -z "$CLAUDE_CONFIG_PATH" ]]; then
CLAUDE_CONFIG_PATH="$HOME/.config/Claude/claude_desktop_config.json" CLAUDE_CONFIG_PATH="$HOME/Library/Application Support/Claude/claude_desktop_config.json"
fi fi
case "$CLAUDE_CONFIG_PATH" in case "$CLAUDE_CONFIG_PATH" in
@@ -243,7 +243,7 @@ if [[ "$MODE" == "verify" ]]; then
exit 0 exit 0
fi fi
MERGE_RESULT="$(merge_config)" || { MERGE_RESULT="$(merge_config 2>&1)" || {
echo "$MERGE_RESULT" echo "$MERGE_RESULT"
exit 1 exit 1
} }
@@ -314,4 +314,4 @@ echo " 2. Reopen Claude Desktop"
echo " 3. In a new chat, check: + → Connectors" echo " 3. In a new chat, check: + → Connectors"
echo " 4. Verify with:" echo " 4. Verify with:"
echo " Use the ${BOLD}$SERVER_NAME${RESET} MCP server to run ${BOLD}check_kicad_ui${RESET}." echo " Use the ${BOLD}$SERVER_NAME${RESET} MCP server to run ${BOLD}check_kicad_ui${RESET}."
echo echo