Fix issue where we have undefined ghlink variable
In some cases if we don't have a version we also don't have the ghlink variable defined which break the script, so always initialize it.
This commit is contained in:
Родитель
c18a0fabb3
Коммит
770d0df3b9
|
@ -109,6 +109,7 @@ function CheckOptionalLinks($linkTemplates, $pkg, $skipIfNA = $false)
|
|||
if (!$skipIfNA -or $pkg.GHDocs -eq "")
|
||||
{
|
||||
$ghdocvalid = ($pkg.VersionGA -or $pkg.VersionPreview)
|
||||
$ghlink = "[No versioned link yet]"
|
||||
if ($pkg.VersionGA) {
|
||||
$ghlink = GetLinkTemplateValue $linkTemplates "ghdocs_url_template" $pkg.Package $pkg.VersionGA
|
||||
$ghdocvalid = $ghdocvalid -and (CheckLink $ghlink $false)
|
||||
|
@ -372,4 +373,4 @@ elseif ($languageNameMapping.ContainsKey($language)) {
|
|||
else {
|
||||
Write-Error "Unrecognized Language: $language"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче