Context and request
Install-GoogleFont creates its per-invocation download directory under $HOME:
$guid = (New-Guid).Guid
$tempPath = Join-Path -Path $HOME -ChildPath "GoogleFonts-$guid"
When an installation fails or is interrupted before the clean block runs, downloaded artifacts remain in the user's home directory. Those directories are not managed by normal operating-system temporary-file cleanup.
Desired outcome
Create temporary download directories under the platform's system-designated temporary path, while retaining the existing GUID-based uniqueness and cleanup behavior.
Acceptance criteria
Install-GoogleFont bases its temporary directory on [System.IO.Path]::GetTempPath() rather than $HOME.
- The per-invocation GUID naming scheme remains collision-safe.
- The
clean block continues to remove the temporary directory after a normal or terminating invocation.
- Successful installation behavior is unchanged on Windows, Linux, and macOS.
Related
Context and request
Install-GoogleFontcreates its per-invocation download directory under$HOME:When an installation fails or is interrupted before the
cleanblock runs, downloaded artifacts remain in the user's home directory. Those directories are not managed by normal operating-system temporary-file cleanup.Desired outcome
Create temporary download directories under the platform's system-designated temporary path, while retaining the existing GUID-based uniqueness and cleanup behavior.
Acceptance criteria
Install-GoogleFontbases its temporary directory on[System.IO.Path]::GetTempPath()rather than$HOME.cleanblock continues to remove the temporary directory after a normal or terminating invocation.Related