| 2205 | /* ── Agent detection ──────────────────────────────────────────── */ |
| 2206 | |
| 2207 | static bool dir_exists(const char *path) { |
| 2208 | struct stat st; |
| 2209 | #ifndef _WIN32 |
| 2210 | return lstat(path, &st) == 0 && S_ISDIR(st.st_mode); |
| 2211 | #else |
| 2212 | return stat(path, &st) == 0 && S_ISDIR(st.st_mode); |
| 2213 | #endif |
| 2214 | } |
| 2215 | |
| 2216 | /* Resolve the Claude Code config dir. |
| 2217 | * Honors $CLAUDE_CONFIG_DIR; falls back to "$home_dir/.claude". */ |
no test coverage detected