Skip to content

Commit

Permalink
20230411B
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoalh committed Apr 11, 2023
1 parent 1bb5b28 commit 351322c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ runs:
[Boolean]$IsDebugMode = $Env:RUNNER_DEBUG -ieq 1 -or $Env:RUNNER_DEBUG -ieq 'True'
[SemVer]$PowerShellGetMinimumVersion = [SemVer]::Parse('2.2.5')
Try {
$PSModulePowerShellGetMeta = Get-InstalledModule -Name 'PowerShellGet'
If ($PSModulePowerShellGetMeta.Version -ilt $PowerShellGetMinimumVersion) {
$PSModulePowerShellGetMeta = (Get-PackageProvider -Name 'PowerShellGet' -ErrorAction 'SilentlyContinue') ?? (Get-InstalledModule -Name 'PowerShellGet' -ErrorAction 'SilentlyContinue')
If (
$Null -ieq $PSModulePowerShellGetMeta -or
$PSModulePowerShellGetMeta.Version -ilt $PowerShellGetMinimumVersion
) {
Throw
}
}
Expand Down

0 comments on commit 351322c

Please sign in to comment.