vmware / powershell-module-for-vmware-cloud-foundation-password-management

PowerShell Module for VMware Cloud Foundation Password Management
https://vmware.github.io/powershell-module-for-vmware-cloud-foundation-password-management/
BSD 2-Clause "Simplified" License
11 stars 9 forks source link

Enhance to support both Photon OS 4.0 and 5.0 #201

Closed sowjuec closed 2 months ago

sowjuec commented 2 months ago

Code of Conduct

Description

There is a line in the code where only photon os version 4.0 is matched where the changes are applicable even for 5.0, change the below line of code from $photonRelease.ScriptOutput -match "4.0" to $photonRelease.ScriptOutput -match "[4-5].0"

Use Case(s)

If we try to run against photon os 5.0, it doesn't pass the line and hence takes up setting for <4.0 version which is wrong $photonRelease.ScriptOutput -match "4.0"

Potential Configuration

change the below line of code from $photonRelease.ScriptOutput -match "4.0" to $photonRelease.ScriptOutput -match "[4-5].0"

This is because -ge "4.0", sometimes has behaved wierdly.

References

No response