Skip to content

Use the system temp directory for temporary font downloads #274

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    PatchFixes bugs or adds small fixes to existing functionalityenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions