Skip to content

Commit 3ba766b

Browse files
authored
skip checking assemblies if dependency map csv file does not exist (#21334)
1 parent 1e8bf3a commit 3ba766b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/CheckAssemblies.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ function Get-PreloadAssemblies{
3636
$ProjectPaths = @( "$PSScriptRoot\..\artifacts\$BuildConfig" )
3737
$DependencyMapPath = "$PSScriptRoot\..\artifacts\StaticAnalysisResults\DependencyMap.csv"
3838

39-
$DependencyMap = Import-Csv -Path $DependencyMapPath
39+
if (-not (Test-Path $DependencyMapPath)) {
40+
Write-Host "$DependencyMapPath does not exist. Skip it."
41+
return
42+
}
4043

44+
$DependencyMap = Import-Csv -Path $DependencyMapPath
4145

4246
.($PSScriptRoot + "\PreloadToolDll.ps1")
4347
$ModuleManifestFiles = $ProjectPaths | ForEach-Object { Get-Item "Az.*.psd1" | Where-Object { $_.FullName -like "*$($BuildConfig)*" -and `

0 commit comments

Comments
 (0)