Fix build not detecting dotnet version
This commit is contained in:
parent
bb14125542
commit
da9ecaec98
3
.gitignore
vendored
3
.gitignore
vendored
@ -260,3 +260,6 @@ paket-files/
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
**/launchSettings.json
|
**/launchSettings.json
|
||||||
|
|
||||||
|
|
||||||
|
global.json
|
@ -45,7 +45,7 @@ try {
|
|||||||
}
|
}
|
||||||
# If dotnet is installed locally, and expected version is not set or installation matches the expected version
|
# If dotnet is installed locally, and expected version is not set or installation matches the expected version
|
||||||
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
|
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
|
||||||
(!(Test-Path variable:DotNetVersion) -or $(& cmd /c 'dotnet --version 2>&1') -eq $DotNetVersion)) {
|
(!(Test-Path variable:DotNetVersion) -or $(& cmd.exe /c 'dotnet --version 2>&1') -eq $DotNetVersion)) {
|
||||||
$env:DOTNET_EXE = (Get-Command "dotnet").Path
|
$env:DOTNET_EXE = (Get-Command "dotnet").Path
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user