You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use system temp directory for temporary font downloads instead of $HOME #63
If the command fails or is interrupted before the clean block runs, the temporary directory with downloaded archives persists in the user's home folder. This location is not subject to automatic cleanup by the OS (Disk Cleanup on Windows, tmpwatch/systemd-tmpfiles on Linux), so the leftover directories accumulate silently.
Request
Current experience
Temporary download artifacts are left in the user's home directory on failure. The user must manually discover and delete NerdFonts-<guid> folders.
Desired experience
Temporary files should reside under the system-designated temp directory ($Env:TEMP on Windows, /tmp on Linux/macOS). If the command fails, the OS or its cleanup utilities can reclaim the space automatically. The home directory remains clean.
Acceptance criteria
The temporary download directory is created under the appropriate system temp path, not $HOME
The GUID-based naming scheme can be retained or simplified, as long as collisions remain improbable
Existing cleanup logic in the clean block continues to work
No change in behavior when the command completes successfully
Temp path source: Use [System.IO.Path]::GetTempPath() or $Env:TEMP (Windows) / the equivalent on other platforms. Both are idiomatic. [System.IO.Path]::GetTempPath() is cross-platform by default.
Directory naming: Keep using New-Guid for uniqueness — it is fast, trivially unique, and already in use. No reason to change the naming scheme.
Implementation plan
Change the temp directory base path from $HOME to [System.IO.Path]::GetTempPath() in src/functions/public/Install-NerdFont.ps1
Verify cleanup in the clean block still removes the directory correctly
Test on Windows and (if CI supports it) Linux/macOS
Closing as completed: Install-NerdFont now uses [System.IO.Path]::GetTempPath() for its temporary workspace, and the clean block removes that directory. Direct execution of the current source confirmed both the system-temp location and cleanup.
Activity
MariusStorhaug commentedon Aug 8, 2026
Closing as completed: Install-NerdFont now uses [System.IO.Path]::GetTempPath() for its temporary workspace, and the clean block removes that directory. Direct execution of the current source confirmed both the system-temp location and cleanup.