| 2656 | /* ── Agent detection ──────────────────────────────────────────── */ |
| 2657 | |
| 2658 | static bool dir_exists(const char *path) { |
| 2659 | struct stat st; |
| 2660 | #ifndef _WIN32 |
| 2661 | return lstat(path, &st) == 0 && S_ISDIR(st.st_mode); |
| 2662 | #else |
| 2663 | return stat(path, &st) == 0 && S_ISDIR(st.st_mode); |
| 2664 | #endif |
| 2665 | } |
| 2666 | |
| 2667 | /* Resolve the Claude Code config dir. |
| 2668 | * Honors $CLAUDE_CONFIG_DIR; falls back to "$home_dir/.claude". */ |
no test coverage detected