From 8d2edce44acaa68713158e215c50e22b9cb0d730 Mon Sep 17 00:00:00 2001 From: praveenkuttappan Date: Mon, 25 Jan 2021 10:07:03 -0800 Subject: [PATCH 1/2] Add check for valid API review directory --- eng/scripts/Language-Settings.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index e756134691dc..bc1a73a752be 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -210,6 +210,11 @@ function Find-javascript-Artifacts-For-Apireview($artifactDir, $packageName = "" [regex]$pattern = "azure-" $pkgName = $pattern.replace($packageName, "", 1) $packageDir = Join-Path $artifactDir $pkgName "temp" + if (-not (Test-Path $packageDir)) + { + Write-Error "Temp directory is not found in package root. Verify if docmodel is enabled in api-extractor.json." + return $null + } Write-Host "Searching for *.api.json in path $($packageDir)" $files = Get-ChildItem "${packageDir}" | Where-Object -FilterScript { $_.Name.EndsWith(".api.json") } if (!$files) From 053ca9f39ef5c714f81b0a89a401ad5cec93fded Mon Sep 17 00:00:00 2001 From: praveenkuttappan Date: Mon, 25 Jan 2021 10:47:49 -0800 Subject: [PATCH 2/2] Add check for valid API review directory --- eng/scripts/Language-Settings.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index bc1a73a752be..8756d1491703 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -212,7 +212,7 @@ function Find-javascript-Artifacts-For-Apireview($artifactDir, $packageName = "" $packageDir = Join-Path $artifactDir $pkgName "temp" if (-not (Test-Path $packageDir)) { - Write-Error "Temp directory is not found in package root. Verify if docmodel is enabled in api-extractor.json." + Write-Host "Temp directory is not found in package root. Verify if docmodel is enabled in api-extractor.json." return $null } Write-Host "Searching for *.api.json in path $($packageDir)"