Skip to content

Commit a45d38f

Browse files
committed
Use scenario-specific spell-check-public-api.ps1
1 parent 47cf0e6 commit a45d38f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

eng/scripts/Export-API.ps1

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,18 @@ foreach ($file in $apiListingFiles) {
5151
}
5252

5353
if ($SpellCheckPublicApiSurface) {
54-
Write-Host "Spell check public API surface (found $($apiListingFiles.Count) files)"
55-
&"$PSScriptRoot/../common/spelling/Invoke-Cspell.ps1" `
56-
-FileList $apiListingFiles.FullName
54+
Write-Host "Spell check public API surface"
55+
56+
if ($PSCmdlet.ParameterSetName -eq 'PackagePath') {
57+
&"$PSScriptRoot/spell-check-public-api.ps1" `
58+
-RelativePackagePath $relativePackagePath
59+
} else {
60+
&"$PSScriptRoot/spell-check-public-api.ps1" `
61+
-ServiceDirectory $relativePackagePath
62+
}
5763

5864
if ($LASTEXITCODE) {
5965
Write-Host "##vso[task.LogIssue type=error;]Spelling errors detected. To correct false positives or learn about spell checking see: https://aka.ms/azsdk/engsys/spellcheck"
66+
exit $LASTEXITCODE
6067
}
6168
}

0 commit comments

Comments
 (0)