Skip to content

Commit 3c5b421

Browse files
committed
setup-build: Add more logging
1 parent d4dd221 commit 3c5b421

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/actions/setup-build/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ runs:
136136
-PassThru `
137137
-ArgumentList "modify", `
138138
"--noUpdateInstaller", `
139+
"--log", "${env:TEMP}\vs_installer_log_winsdk.log", `
139140
"--installPath", "`"$InstallPath`"", `
140141
"--channelId", "https://aka.ms/vs/17/release/channel", `
141142
"--quiet", "--norestart", "--nocache", `
@@ -146,8 +147,7 @@ runs:
146147
Write-Output "ℹ️ Windows SDK ${WinSdkVersionString} installed successfully."
147148
} else {
148149
Write-Output "::error::Failed to install Windows SDK ${WinSdkVersionString}. Check the installer log for details."
149-
$LogFile = Get-ChildItem "${env:TEMP}" -Filter "dd_installer_*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
150-
"log-file=$($LogFile.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
150+
"log-file=${env:TEMP}\vs_installer_log_winsdk.log" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
151151
exit 1
152152
}
153153
}
@@ -213,6 +213,7 @@ runs:
213213
-ArgumentList "modify", `
214214
"--noUpdateInstaller", `
215215
"--installPath", "`"$InstallPath`"", `
216+
"--log", "${env:TEMP}\vs_installer_log_msvc.log", `
216217
"--channelId", "https://aka.ms/vs/17/release/channel", `
217218
"--quiet", "--norestart", "--nocache", `
218219
"--add", "Microsoft.VisualStudio.Component.VC.${MSVCPackageVersion}.x86.x64", `
@@ -234,8 +235,7 @@ runs:
234235
235236
if ($MSVCBuildToolsVersion -eq "") {
236237
Write-Output "::error::Failed to install MSVC ${MSVCVersionString}. Check the installer log for details."
237-
$LogFile = Get-ChildItem "${env:TEMP}" -Filter "dd_installer_*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
238-
"log-file=$($LogFile.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
238+
"log-file=${env:TEMP}\vs_installer_log_msvc.log" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
239239
exit 1
240240
} else {
241241
Write-Output "ℹ️ MSVC ${MSVCBuildToolsVersion} installed successfully."

0 commit comments

Comments
 (0)