From 71a9049e380f407fdcea1c1a7d94eff2837cb0fb Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Thu, 5 Aug 2021 07:26:07 +0300 Subject: [PATCH] [Windows] Fix platform conditions by adding brackets (#3856) --- images/win/scripts/Installers/Install-DotnetSDK.ps1 | 2 +- .../win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-DotnetSDK.ps1 b/images/win/scripts/Installers/Install-DotnetSDK.ps1 index 4a9af0f0..dcffdfd4 100644 --- a/images/win/scripts/Installers/Install-DotnetSDK.ps1 +++ b/images/win/scripts/Installers/Install-DotnetSDK.ps1 @@ -32,7 +32,7 @@ function Invoke-Warmup ( function Fix-ImportPublishProfile ( $SdkVersion ) { - if (Test-IsWin16 -or Test-IsWin19) { + if ((Test-IsWin16) -or (Test-IsWin19)) { # Fix for issue https://github.com/dotnet/sdk/issues/1276. This will be fixed in 3.1. $sdkTargetsName = "Microsoft.NET.Sdk.ImportPublishProfile.targets" $sdkTargetsUrl = "https://raw.githubusercontent.com/dotnet/sdk/82bc30c99f1325dfaa7ad450be96857a4fca2845/src/Tasks/Microsoft.NET.Build.Tasks/targets/${sdkTargetsName}" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 index 0bcdd5af..21f2e5dd 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 @@ -52,7 +52,7 @@ function Get-VisualStudioExtensions { ) } - if (Test-IsWin16 -or Test-IsWin19) { + if ((Test-IsWin16) -or (Test-IsWin19)) { # Wix $wixPackageVersion = Get-WixVersion $wixExtensionVersion = ($vsPackages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version