From 18e4b74d0bbf3b140c6bd31c273f5562c742ddb3 Mon Sep 17 00:00:00 2001 From: deepend Date: Tue, 3 Feb 2026 19:34:30 -0700 Subject: [PATCH] Added a fallback to TEMP and ensured the temp directory exists before downloading/extracting Lua in the Windows workflow to avoid invalid RUNNER_TEMP paths. --- .github/workflows/windows-build.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 1b1eda59..16596691 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -92,10 +92,14 @@ jobs: $luaArchive = "lua-$luaVersion.tar.gz" $luaUrl = "https://www.lua.org/ftp/$luaArchive" $luaDir = "lua-$luaVersion" - $luaExtractRoot = Join-Path $env:RUNNER_TEMP $luaDir - Invoke-WebRequest $luaUrl -OutFile (Join-Path $env:RUNNER_TEMP $luaArchive) - & 7z.exe x (Join-Path $env:RUNNER_TEMP $luaArchive) -o$env:RUNNER_TEMP | Out-Null - & 7z.exe x (Join-Path $env:RUNNER_TEMP "lua-$luaVersion.tar") -o$env:RUNNER_TEMP | Out-Null + $runnerTemp = $env:RUNNER_TEMP + if (-not $runnerTemp) { $runnerTemp = $env:TEMP } + if (-not $runnerTemp) { throw "RUNNER_TEMP/TEMP is not set." } + New-Item -Path $runnerTemp -ItemType Directory -Force | Out-Null + $luaExtractRoot = Join-Path $runnerTemp $luaDir + Invoke-WebRequest $luaUrl -OutFile (Join-Path $runnerTemp $luaArchive) + & 7z.exe x (Join-Path $runnerTemp $luaArchive) -o$runnerTemp | Out-Null + & 7z.exe x (Join-Path $runnerTemp "lua-$luaVersion.tar") -o$runnerTemp | Out-Null $luaBuildArch = if ($gvsPlatform -eq "x86") { "x86" } else { "amd64" } cmd /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat`" -arch=$luaBuildArch && cd /d `"$luaExtractRoot\src`" && nmake -f Makefile.msc"