@@ -136,6 +136,7 @@ runs:
136
136
-PassThru `
137
137
-ArgumentList "modify", `
138
138
"--noUpdateInstaller", `
139
+ "--log", "${env:TEMP}\vs_installer_log_winsdk.log", `
139
140
"--installPath", "`"$InstallPath`"", `
140
141
"--channelId", "https://aka.ms/vs/17/release/channel", `
141
142
"--quiet", "--norestart", "--nocache", `
@@ -146,8 +147,7 @@ runs:
146
147
Write-Output "ℹ️ Windows SDK ${WinSdkVersionString} installed successfully."
147
148
} else {
148
149
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
151
151
exit 1
152
152
}
153
153
}
@@ -213,6 +213,7 @@ runs:
213
213
-ArgumentList "modify", `
214
214
"--noUpdateInstaller", `
215
215
"--installPath", "`"$InstallPath`"", `
216
+ "--log", "${env:TEMP}\vs_installer_log_msvc.log", `
216
217
"--channelId", "https://aka.ms/vs/17/release/channel", `
217
218
"--quiet", "--norestart", "--nocache", `
218
219
"--add", "Microsoft.VisualStudio.Component.VC.${MSVCPackageVersion}.x86.x64", `
@@ -234,8 +235,7 @@ runs:
234
235
235
236
if ($MSVCBuildToolsVersion -eq "") {
236
237
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
239
239
exit 1
240
240
} else {
241
241
Write-Output "ℹ️ MSVC ${MSVCBuildToolsVersion} installed successfully."
0 commit comments