mirror of https://github.com/dapr/cli.git
Fix for panic during upgrade of edge version dapr (#983)
* Fix for panic during upgrade of edge version dapr Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com> * change console log message Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com> Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
This commit is contained in:
parent
3d01ffd8d3
commit
8e9c675bf6
|
@ -169,7 +169,12 @@ func upgradeChartValues(ca, issuerCert, issuerKey string, haMode, mtls bool, arg
|
|||
|
||||
func isDowngrade(targetVersion, existingVersion string) bool {
|
||||
target, _ := version.NewVersion(targetVersion)
|
||||
existing, _ := version.NewVersion(existingVersion)
|
||||
|
||||
existing, err := version.NewVersion(existingVersion)
|
||||
if err != nil {
|
||||
print.FailureStatusEvent(
|
||||
os.Stderr,
|
||||
fmt.Sprintf("Upgrade failed, %s. The current installed version does not have sematic versioning", err.Error()))
|
||||
os.Exit(1)
|
||||
}
|
||||
return target.LessThan(existing)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue