From 035332e12add8cef9d7d6d673c8e51a3ad8a9280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Sat, 29 May 2021 20:04:22 +0200 Subject: [PATCH 1/4] Remove SupportsShouldProcess from Start-PSBootstrap in build.psm1 This addresses #15490 on PowerShell/PowerShell --- build.psm1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.psm1 b/build.psm1 index 690b8684f68..d90bdb8c58d 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1803,9 +1803,7 @@ function Get-RedHatPackageManager { } function Start-PSBootstrap { - [CmdletBinding( - SupportsShouldProcess=$true, - ConfirmImpact="High")] + [CmdletBinding()] param( [string]$Channel = $dotnetCLIChannel, # we currently pin dotnet-cli version, and will From 2ea9c9e7fec11243197d219a5a5606aa4c847136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Wed, 9 Jun 2021 21:45:36 +0200 Subject: [PATCH 2/4] =?UTF-8?q?Added=20=E2=80=9CConfirmImpact=3D"High"?= =?UTF-8?q?=E2=80=9D=20to=20Start-PSBootstrap.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hopefully this will adress the issues in PR #15491 I’m not sure why the build would fail — I hadn’t changed anything besides removing the CmdletBindingAttribute parameters… I’ve checked if build.psm1 or ci.psm1 (which is where the errors semm to be happening) ever mention “WhatIf” or “ShouldProcess” — they don’t. ci.psm1’s Invoke-CIBuild seems to be failing because Get-PSOptions (imported from build.psm1) returns $null. However, this is because of a global variable set at the top of the script, which was there before my changes occurred. I’m very confused. --- build.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index d90bdb8c58d..afd6db61b9d 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1803,7 +1803,7 @@ function Get-RedHatPackageManager { } function Start-PSBootstrap { - [CmdletBinding()] + [CmdletBinding(ConfirmImpact="High")] param( [string]$Channel = $dotnetCLIChannel, # we currently pin dotnet-cli version, and will From b5614d485437be9624cde7b14dee0b66e3df6fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Thu, 10 Jun 2021 14:04:20 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Revert=20re-adding=20of=20=E2=80=9CConfirmP?= =?UTF-8?q?reference=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index afd6db61b9d..d90bdb8c58d 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1803,7 +1803,7 @@ function Get-RedHatPackageManager { } function Start-PSBootstrap { - [CmdletBinding(ConfirmImpact="High")] + [CmdletBinding()] param( [string]$Channel = $dotnetCLIChannel, # we currently pin dotnet-cli version, and will From fae5400e433b6a00d6be22c958e712b2e884fd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Thu, 10 Jun 2021 14:05:25 +0200 Subject: [PATCH 4/4] =?UTF-8?q?Remove=20=E2=80=9C-Confirm:$false=E2=80=9D?= =?UTF-8?q?=20from=20./tools/ci.psm1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/ci.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci.psm1 b/tools/ci.psm1 index 21139ade5cc..afdf5b81bab 100644 --- a/tools/ci.psm1 +++ b/tools/ci.psm1 @@ -171,7 +171,7 @@ function Invoke-CIInstall } Set-BuildVariable -Name TestPassed -Value False - Start-PSBootstrap -Confirm:$false + Start-PSBootstrap } function Invoke-CIxUnit