You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ModuleFast.ps1
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ using namespace System.IO.Compression
4
4
usingnamespaceSystem.Reflection
5
5
6
6
#requires -version7.2
7
+
7
8
# This is the bootstrap script for Modules
8
9
[CmdletBinding(PositionalBinding=$false)]
9
10
param (
@@ -34,8 +35,15 @@ param (
34
35
[Parameter(DontShow)]
35
36
[switch]$UseMain
36
37
)
38
+
37
39
$ErrorActionPreference='Stop'
38
40
41
+
#Bootstrap via IEX does not evaluate requires so we need an additional check here:
42
+
if ($PSVersionTable.PSVersion-lt'7.2.0') {
43
+
throw [NotSupportedException]'The ModuleFast Bootstrap script requires PowerShell 7.2 or higher. Specific ModuleFast versions may have more strict requirements.'
44
+
}
45
+
46
+
39
47
40
48
#We need to load the versioning assembly before we load the dependent classes
41
49
#We inline this in order to keep ModuleFast self-contained
0 commit comments