Skip to content

Commit

Permalink
Merge pull request #298 from SteveL-MSFT/psgroup-version
Browse files Browse the repository at this point in the history
fix version check in psgroup resource
  • Loading branch information
SteveL-MSFT authored Jan 30, 2024
2 parents 2496169 + d1d83c8 commit 9afe0f2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions powershellgroup/powershellgroup.resource.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function RefreshCache
$script:ResourceCache = @{}

$DscResources = Get-DscResource

foreach ($r in $DscResources)
{
$moduleName = "";
Expand All @@ -33,7 +33,7 @@ function RefreshCache
}
}

if (($PSVersionTable.PSVersion.Major -ge 7) -and ($PSVersionTable.PSVersion.Minor -ge 4) `
if (($PSVersionTable.PSVersion.Major -eq 7) -and ($PSVersionTable.PSVersion.Minor -eq 4) `
-and ($PSVersionTable.PSVersion.PreReleaseLabel.StartsWith("preview")))
{
throw "PowerShell 7.4-previews are not supported by PowerShellGroup resource; please use PS 7.4.0-rc.1 or newer."
Expand Down Expand Up @@ -153,7 +153,7 @@ elseif ($Operation -eq 'Get')
{
$inputht = @{}
$ResourceTypeName = ($inputobj_pscustomobj.type -split "/")[1]
$inputobj_pscustomobj.psobject.properties | %{
$inputobj_pscustomobj.psobject.properties | %{
if ($_.Name -ne "type")
{
$inputht[$_.Name] = $_.Value
Expand Down Expand Up @@ -227,7 +227,7 @@ elseif ($Operation -eq 'Set')
{
$inputht = @{}
$ResourceTypeName = ($inputobj_pscustomobj.type -split "/")[1]
$inputobj_pscustomobj.psobject.properties | %{
$inputobj_pscustomobj.psobject.properties | %{
if ($_.Name -ne "type")
{
$inputht[$_.Name] = $_.Value
Expand Down Expand Up @@ -301,7 +301,7 @@ elseif ($Operation -eq 'Test')
{
$inputht = @{}
$ResourceTypeName = ($inputobj_pscustomobj.type -split "/")[1]
$inputobj_pscustomobj.psobject.properties | %{
$inputobj_pscustomobj.psobject.properties | %{
if ($_.Name -ne "type")
{
$inputht[$_.Name] = $_.Value
Expand Down

0 comments on commit 9afe0f2

Please sign in to comment.