Skip to content

Commit

Permalink
Fixed the failures from strict mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
sima-zhu authored and azure-sdk committed Feb 3, 2022
1 parent c29e4cb commit 554b591
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions eng/common/scripts/Helpers/Metadata-Helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function GetMsAliasFromGithub ($TenantId, $ClientId, $ClientSecret, $GithubUser)
$resp = Invoke-RestMethod $OpensourceAPIBaseURI -Method 'GET' -Headers $Headers
}
catch {
Write-Error $_
Write-Warning $_
return $null
}

Expand All @@ -43,7 +43,7 @@ function GetMsAliasFromGithub ($TenantId, $ClientId, $ClientSecret, $GithubUser)
Write-Host "Fetched aad identity $($resp.aad.alias) for github user $GithubUser."
return $resp.aad.alias
}
Write-Error "Failed to retrieve the aad identity from given github user: $GithubName"
Write-Warning "Failed to retrieve the aad identity from given github user: $GithubName"
return $null
}

Expand All @@ -54,6 +54,6 @@ function GetPrimaryCodeOwner ($TargetDirectory)
Write-Host "Code Owners are $codeOwnerArray."
return $codeOwnerArray[0]
}
Write-Error "No code owner found in $TargetDirectory."
Write-Warning "No code owner found in $TargetDirectory."
return $null
}
4 changes: 0 additions & 4 deletions eng/common/scripts/Update-DocsMsMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,6 @@ foreach ($packageInfoLocation in $PackageInfoJsonLocations) {
if ($ValidateDocsMsPackagesFn -and (Test-Path "Function:$ValidateDocsMsPackagesFn")) {
Write-Host "Validating the package..."
&$ValidateDocsMsPackagesFn -PackageInfo $packageInfo -PackageSourceOverride $PackageSourceOverride -DocValidationImageId $DocValidationImageId -DocRepoLocation $DocRepoLocation
if ($LASTEXITCODE) {
LogError "The package failed Doc.Ms validation. Check https://aka.ms/azsdk/docs/docker for more details on how to diagnose this issue."
exit $LASTEXITCODE
}
}
Write-Host "Updating the package json ..."
UpdateDocsMsMetadataForPackage $packageInfoLocation $packageInfo
Expand Down

0 comments on commit 554b591

Please sign in to comment.