Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,8 @@ function Install-Dotnet {
param(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adityapatwardhan, your last commit had 5 failures in PowerShell-CI-static-analysis
Verify Markdown Links.Verify links in /home/vsts/work/1/s/demos/WindowsPowerShellModules/README.md.https://blogs.msdn.microsoft.com/powershell/2017/07/14/powershell-6-0-roadmap-coreclr-backwards-compatibility-and-more/ should work

Failed to complete request to "https://blogs.msdn.microsoft.com/powershell/2017/07/14/powershell-6-0-roadmap-coreclr-backwards-compatibility-and-more/". Response status code does not indicate success: 404 (Not Found).
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-link.tests.ps1: line 119
119:                                     throw "Failed to complete request to `"$url`". $($_.Exception.Message)"

Verify Markdown Links.Verify links in /home/vsts/work/1/s/CHANGELOG/6.0.md.https://blogs.msdn.microsoft.com/powershell/2017/07/14/powershell-6-0-roadmap-coreclr-backwards-compatibility-and-more/ should work

Failed to complete request to "https://blogs.msdn.microsoft.com/powershell/2017/07/14/powershell-6-0-roadmap-coreclr-backwards-compatibility-and-more/". Response status code does not indicate success: 404 (Not Found).
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-link.tests.ps1: line 119
119:                                     throw "Failed to complete request to `"$url`". $($_.Exception.Message)"

Verify Markdown Links.Verify links in /home/vsts/work/1/s/CHANGELOG/6.0.md.https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/ should work

Failed to complete request to "https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/". Response status code does not indicate success: 404 (Not Found).
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-link.tests.ps1: line 119
119:                                     throw "Failed to complete request to `"$url`". $($_.Exception.Message)"

Verify Markdown Links.Verify links in /home/vsts/work/1/s/CHANGELOG/6.0.md.https://blogs.msdn.microsoft.com/powershell/2017/01/31/powershell-open-source-community-dashboard/ should work

Failed to complete request to "https://blogs.msdn.microsoft.com/powershell/2017/01/31/powershell-open-source-community-dashboard/". Response status code does not indicate success: 404 (Not Found).
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-link.tests.ps1: line 119
119:                                     throw "Failed to complete request to `"$url`". $($_.Exception.Message)"

Verify Markdown Links.Verify links in /home/vsts/work/1/s/README.md.https://blogs.msdn.microsoft.com/powershell/2017/01/31/powershell-open-source-community-dashboard/ should work

Connection timed out
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-link.tests.ps1: line 114
114:                                 $null = Invoke-WebRequest -uri $url -RetryIntervalSec 10 -MaximumRetryCount 6

[string]$Channel = $dotnetCLIChannel,
[string]$Version = $dotnetCLIRequiredVersion,
[switch]$NoSudo
[switch]$NoSudo,
[string]$InstallDir
)

# This allows sudo install to be optional; needed when running in containers / as root
Expand Down Expand Up @@ -1660,20 +1661,35 @@ function Install-Dotnet {
$installScript = "dotnet-install.sh"
Start-NativeExecution {
& $curl -sO $installObtainUrl/$installScript
bash ./$installScript -c $Channel -v $Version

if (-not $InstallDir) {
bash ./$installScript -c $Channel -v $Version
} else {
bash ./$installScript -c $Channel -v $Version -i $InstallDir
}
}
} elseif ($environment.IsWindows) {
Remove-Item -ErrorAction SilentlyContinue -Recurse -Force ~\AppData\Local\Microsoft\dotnet
$installScript = "dotnet-install.ps1"
Invoke-WebRequest -Uri $installObtainUrl/$installScript -OutFile $installScript

if (-not $environment.IsCoreCLR) {
& ./$installScript -Channel $Channel -Version $Version
if (-not $InstallDir) {
& ./$installScript -Channel $Channel -Version $Version
} else {
& ./$installScript -Channel $Channel -Version $Version -InstallDir $InstallDir
}
} else {
# dotnet-install.ps1 uses APIs that are not supported in .NET Core, so we run it with Windows PowerShell
$fullPSPath = Join-Path -Path $env:windir -ChildPath "System32\WindowsPowerShell\v1.0\powershell.exe"
$fullDotnetInstallPath = Join-Path -Path $PWD.Path -ChildPath $installScript
Start-NativeExecution { & $fullPSPath -NoLogo -NoProfile -File $fullDotnetInstallPath -Channel $Channel -Version $Version }
Start-NativeExecution {
if (-not $InstallDir) {
& $fullPSPath -NoLogo -NoProfile -File $fullDotnetInstallPath -Channel $Channel -Version $Version
} else {
& $fullPSPath -NoLogo -NoProfile -File $fullDotnetInstallPath -Channel $Channel -Version $Version -InstallDir $InstallDir
}
}
}
}
}
Expand Down