From e953d6262d1cccf383cce9708a4e954af1d5c20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Concei=C3=A7=C3=A3o?= Date: Sun, 29 Jan 2023 18:59:06 +0000 Subject: [PATCH] Update PS scripts to check PS version --- Scripts/UVtools.Powershell/Erode-Bottom.ps1 | 5 +++++ Scripts/UVtools.Powershell/List-Layers.ps1 | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Scripts/UVtools.Powershell/Erode-Bottom.ps1 b/Scripts/UVtools.Powershell/Erode-Bottom.ps1 index b7c47bf..7149989 100644 --- a/Scripts/UVtools.Powershell/Erode-Bottom.ps1 +++ b/Scripts/UVtools.Powershell/Erode-Bottom.ps1 @@ -1,4 +1,9 @@ # UVtools Script +if($PSVersionTable.PSVersion.Major -lt 7){ + Write-Error("Powershell version $($PSVersionTable.PSVersion) is not compatible with this script.`n +You need at least the version 7.") + return; +} ######################## # Script Configuration # ######################## diff --git a/Scripts/UVtools.Powershell/List-Layers.ps1 b/Scripts/UVtools.Powershell/List-Layers.ps1 index 511b884..742e745 100644 --- a/Scripts/UVtools.Powershell/List-Layers.ps1 +++ b/Scripts/UVtools.Powershell/List-Layers.ps1 @@ -1,4 +1,9 @@ # UVtools Script +if($PSVersionTable.PSVersion.Major -lt 7){ + Write-Error("Powershell version $($PSVersionTable.PSVersion) is not compatible with this script.`n +You need at least the version 7.") + return; +} ######################## # Script Configuration # ########################