File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ void FillCurrentSite(Diagnostics result)
6464 void FillNewerVersionAvailable ( Diagnostics result )
6565 {
6666 var versionAvailable = VersionChecker . GetAvailableVersion ( ) ;
67- if ( versionAvailable != null && VersionChecker . IsNewer ( versionAvailable . Version ) )
67+ if ( versionAvailable != null && VersionChecker . IsNewer ( versionAvailable . SemanticVersion ) )
6868 {
6969 result . NewerVersionAvailable = versionAvailable . ToString ( ) ;
7070 }
Original file line number Diff line number Diff line change 55using System . Net . Http ;
66using System . Net . Http . Headers ;
77using System . Reflection ;
8+ using System . Text . Json . Serialization ;
89using System . Xml ;
910using System . Xml . Linq ;
1011
@@ -73,7 +74,7 @@ public static void CheckVersion(PSCmdlet cmdlet)
7374 if ( onlineVersion != null )
7475 {
7576
76- if ( IsNewer ( onlineVersion . Version ) )
77+ if ( IsNewer ( onlineVersion . SemanticVersion ) )
7778 {
7879 if ( cmdlet != null )
7980 {
@@ -229,7 +230,15 @@ public static PnPVersionResult GetAvailableVersion()
229230
230231 public class PnPVersionResult
231232 {
232- public SemanticVersion Version { get ; set ; }
233+ public string Version { get ; set ; }
234+ public SemanticVersion SemanticVersion
235+ {
236+ get
237+ {
238+ SemanticVersion . TryParse ( Version , out SemanticVersion result ) ;
239+ return result ;
240+ }
241+ }
233242 public string Message { get ; set ; }
234243 }
235244}
You can’t perform that action at this time.
0 commit comments