Skip to content

Commit 0cea893

Browse files
committed
refactor: Use cross-platform temp directory approach
- Replace $env:TEMP with [System.IO.Path]::GetTempPath() - Use [System.Guid]::NewGuid() for unique directory names - More robust cross-platform compatibility
1 parent e11ac81 commit 0cea893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

updater/scripts/cmake-functions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function Find-TagForHash($repo, $hash) {
5757
function Test-HashAncestry($repo, $oldHash, $newHash) {
5858
try {
5959
# Create a temporary directory for git operations
60-
$tempDir = Join-Path $env:TEMP "git-ancestry-check-$(Get-Random)"
60+
$tempDir = Join-Path ([System.IO.Path]::GetTempPath()) ([System.Guid]::NewGuid())
6161
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
6262

6363
try {

0 commit comments

Comments
 (0)