From 9e4b57a0cc6e60df09590b8a9471fe7b4199be43 Mon Sep 17 00:00:00 2001 From: Guillaume Hetier Date: Wed, 12 Feb 2025 14:33:56 -0800 Subject: [PATCH] Require powershell 7.2 for scripts susceptible to be run manually --- scripts/build.ps1 | 2 ++ scripts/generate-dotnet.ps1 | 2 ++ scripts/prepare-machine.ps1 | 2 ++ scripts/test.ps1 | 2 ++ scripts/update-sidecar.ps1 | 2 ++ 5 files changed, 10 insertions(+) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 1869011ce5..54cf71ca65 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -113,6 +113,8 @@ This script provides helpers for building msquic. #> +#Requires -Version 7.2 + param ( [Parameter(Mandatory = $false)] [ValidateSet("Debug", "Release")] diff --git a/scripts/generate-dotnet.ps1 b/scripts/generate-dotnet.ps1 index 1dd659a8fe..22844e17ec 100644 --- a/scripts/generate-dotnet.ps1 +++ b/scripts/generate-dotnet.ps1 @@ -6,6 +6,8 @@ #> +#Requires -Version 7.2 + Set-StrictMode -Version 'Latest' $PSDefaultParameterValues['*:ErrorAction'] = 'Stop' diff --git a/scripts/prepare-machine.ps1 b/scripts/prepare-machine.ps1 index 318648076d..a93066c97f 100644 --- a/scripts/prepare-machine.ps1 +++ b/scripts/prepare-machine.ps1 @@ -30,6 +30,8 @@ on the provided configuration. #> +#Requires -Version 7.2 + param ( [Parameter(Mandatory = $false)] [string]$Tls = "", diff --git a/scripts/test.ps1 b/scripts/test.ps1 index efcd1f5899..237a96a9ae 100644 --- a/scripts/test.ps1 +++ b/scripts/test.ps1 @@ -92,6 +92,8 @@ This script runs the MsQuic tests. test.ps1 -Filter ParameterValidation* -NumIterations 10 #> +#Requires -Version 7.2 + param ( [Parameter(Mandatory = $false)] [ValidateSet("Debug", "Release")] diff --git a/scripts/update-sidecar.ps1 b/scripts/update-sidecar.ps1 index b22f4f0722..66515d19b0 100644 --- a/scripts/update-sidecar.ps1 +++ b/scripts/update-sidecar.ps1 @@ -5,6 +5,8 @@ This regenerates the CLOG sidecar file. #> +#Requires -Version 7.2 + Set-StrictMode -Version 'Latest' $PSDefaultParameterValues['*:ErrorAction'] = 'Stop'