From dd8740eead2bb7169e509e184e666757601e2511 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Wed, 21 Aug 2024 23:38:48 -0700 Subject: [PATCH] Check for PowerShell 7 --- install.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.ps1 b/install.ps1 index e31e807..d55ff51 100644 --- a/install.ps1 +++ b/install.ps1 @@ -48,6 +48,15 @@ function Install-ArdisUtilities { ) begin { + if (($PSVersionTable.PSVersion.Major) -lt 7) { + throw @" +Error: PowerShell 7 or later is required to install ArdisUtilities. +Upgrade PowerShell: + + https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell +"@ + } + # Create a temporary working folder $tempFolder = Join-Path $([IO.Path]::GetTempPath()) $(New-Guid) New-Item -Type Directory -Path $tempFolder | Out-Null -- 2.47.3