Skip to content

Commit

Permalink
Merge pull request #772 from FH-Inway/update-sqlpackage-download-webpage
Browse files Browse the repository at this point in the history
update url of MS documentation page about sqlpackage downloads
  • Loading branch information
Splaxi authored Oct 24, 2023
2 parents 14c4804 + a38ce4c commit 213828b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions d365fo.tools/functions/invoke-d365installsqlpackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ function Invoke-D365InstallSqlPackage {
)

if (-not $SkipExtractFromPage) {
$content = (Invoke-WebRequest -Uri "https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download" -UseBasicParsing).content
$content = (Invoke-WebRequest -Uri "https://learn.microsoft.com/en-us/sql/tools/sqlpackage-download" -UseBasicParsing).content
$res = $content -match '<td.*>Windows .NET Core<.*/td>\s*<td.*><a href="(https://.*)" .*'

if ($res) {
$Url = ([string]$Matches[1]).Trim()
}
else {
Write-PSFMessage -Level Host -Message "Parsing the web page didn't succeed. Will fall back to the download url." -Target "https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download"
Write-PSFMessage -Level Host -Message "Parsing the web page didn't succeed. Will fall back to the download url." -Target "https://learn.microsoft.com/en-us/sql/tools/sqlpackage-download"
}
}

Expand Down

0 comments on commit 213828b

Please sign in to comment.