Skip to content

Commit

Permalink
fix EdgeConfig version compare logic (#186)
Browse files Browse the repository at this point in the history
* fix EdgeConfig version compare logic

* use System.Version compare instead
  • Loading branch information
jagadishmurugan authored Jun 26, 2024
1 parent be700c1 commit 04d3cd2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/modules/AksEdgeDeploy/AksEdgeDeploy.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ function UpgradeJsonFormat {
}
#upgrade from public preview format to GA format
$edgeCfg = $jsonObj.AksEdgeConfig

if ($edgeCfg.SchemaVersion -gt "1.4") {
if ([version]$edgeCfg.SchemaVersion -gt [version]"1.4") {
if (($azCfg.Auth.Password) -and ([string]::IsNullOrEmpty($($edgeCfg.Arc.ClientSecret)))) {
#Copy over the Azure parameters to Arc section
$edgeCfg | Add-Member -MemberType NoteProperty -Name 'Arc' -Value $arcdata -Force
Expand Down

0 comments on commit 04d3cd2

Please sign in to comment.