Updated setup script to recognize dotnet.exe if it is installed in Program Files (x86)
This commit is contained in:
Родитель
eeabd5c836
Коммит
9167db4835
|
@ -30,8 +30,12 @@ function Dotnet {
|
|||
elseif ($dotnet -ne $null) {
|
||||
$source = $dotnet.Definition
|
||||
}
|
||||
|
||||
$dotnetSuffix = "dotnet\dotnet.exe"
|
||||
$isInProgramFiles = $source -eq $(Join-Path $env:ProgramFiles $dotnetSuffix)
|
||||
$isInProgramFilesx86 = $source -eq $(Join-Path ${env:ProgramFiles(x86)} $dotnetSuffix)
|
||||
|
||||
if(-not($source -eq $(Join-Path $env:ProgramFiles "dotnet\dotnet.exe"))) {
|
||||
if(-not($isInProgramFiles) -and -not($isInProgramFilesx86)) {
|
||||
Write-Warning ".NET Core Shared Framework not installed"
|
||||
Write-Warning "Download the .NET Core Runtime (LTS) 'https://www.microsoft.com/net/download/core#/runtime'"
|
||||
throw ".NET Core required to continue"
|
||||
|
|
Загрузка…
Ссылка в новой задаче