chore(installer-pwsh): shift Check-Help method above install methods

This commit is contained in:
James Upjohn 2021-07-13 15:31:30 +12:00
parent b90ad23032
commit f82fdb0e72
No known key found for this signature in database
GPG key ID: D27176569247601C

View file

@ -61,6 +61,14 @@ param(
# Constants
$PSMinSupportedVersion = 5
function Check-Help {
# Cheap and dirty way of getting the same output as '-?' for '-h' and '-Help'
if ($Help) {
Get-Help "$PSCommandPath"
exit 0
}
}
function Verify-PowerShellVersion {
$PSVersion = [int](Select-Object -Property Major -First 1 -ExpandProperty Major -InputObject $PSVersionTable.PSVersion)
@ -115,14 +123,6 @@ function Install-Lepton {
Install-LeptonToProfiles $AbsoluteProfilePaths
}
function Check-Help {
# Cheap and dirty way of getting the same output as '-?' for '-h' and '-Help'
if ($Help) {
Get-Help "$PSCommandPath"
exit 0
}
}
Check-Help
Install-Lepton