()
| 305 | * On Windows: 'claude' (tmpdir() is already per-user) |
| 306 | */ |
| 307 | export function getClaudeTempDirName(): string { |
| 308 | if (getPlatform() === 'windows') { |
| 309 | return 'claude' |
| 310 | } |
| 311 | // Use UID to create per-user directories, preventing permission conflicts |
| 312 | // when multiple users share the same /tmp directory |
| 313 | const uid = process.getuid?.() ?? 0 |
| 314 | return `claude-${uid}` |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Returns the Claude temp directory path with symlinks resolved. |
no test coverage detected