mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2026-03-13 02:10:58 -07:00
feat(installer-pwsh): verify ps version is at least 5
This commit is contained in:
parent
0aedbf248d
commit
0eee712cc5
1 changed files with 14 additions and 1 deletions
15
Install.ps1
15
Install.ps1
|
|
@ -58,8 +58,21 @@ param(
|
|||
[Switch]$Help=$false
|
||||
)
|
||||
|
||||
$PSMinSupportedVersion = 10
|
||||
|
||||
function Verify-PowerShellVersion {
|
||||
$PSVersion = [int](Select-Object -Property Major -First 1 -ExpandProperty Major -InputObject $PSVersionTable.PSVersion | echo)
|
||||
|
||||
Write-Host "[$PSVersion]"
|
||||
if ($PSVersion -lt $PSMinSupportedVersion) {
|
||||
Write-Error -Category NotInstalled "You need a minimum PowerShell version of [$PSMinSupportedVersion] to use this installer. Exiting."
|
||||
exit -1
|
||||
}
|
||||
}
|
||||
|
||||
function Install-Lepton {
|
||||
# TODO: implement
|
||||
Write-Host -NoNewline "Checking PowerShell version... "
|
||||
Verify-PowerShellVersion # Check installed version meets minimum
|
||||
}
|
||||
|
||||
function Check-Help {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue