()
| 315 | * On Windows: 'ncode' (tmpdir() is already per-user) |
| 316 | */ |
| 317 | export function getNcodeTempDirName(): string { |
| 318 | if (getPlatform() === 'windows') { |
| 319 | return 'ncode' |
| 320 | } |
| 321 | // Use UID to create per-user directories, preventing permission conflicts |
| 322 | // when multiple users share the same /tmp directory |
| 323 | const uid = process.getuid?.() ?? 0 |
| 324 | return `ncode-${uid}` |
| 325 | } |
| 326 | |
| 327 | /** |
| 328 | * Returns the NCode temp directory path with symlinks resolved. |
no test coverage detected