File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Flow.Launcher.Core/ExternalPlugins Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = fals
43
43
if ( results . Count == 0 )
44
44
return false ;
45
45
46
- lastFetchedAt = DateTime . Now ;
47
-
48
46
var updatedPluginResults = new List < UserPlugin > ( ) ;
49
47
var appVersion = SemanticVersioning . Version . Parse ( Constant . Version ) ;
50
48
@@ -56,6 +54,8 @@ public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = fals
56
54
57
55
UserPlugins = updatedPluginResults ;
58
56
57
+ lastFetchedAt = DateTime . Now ;
58
+
59
59
return true ;
60
60
}
61
61
}
@@ -73,9 +73,21 @@ public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = fals
73
73
74
74
private static bool IsMinimumAppVersionSatisfied ( UserPlugin plugin , SemanticVersioning . Version appVersion )
75
75
{
76
- if ( string . IsNullOrEmpty ( plugin . MinimumAppVersion ) || appVersion >= SemanticVersioning . Version . Parse ( plugin . MinimumAppVersion ) )
76
+ if ( string . IsNullOrEmpty ( plugin . MinimumAppVersion ) )
77
77
return true ;
78
78
79
+ try
80
+ {
81
+ if ( appVersion >= SemanticVersioning . Version . Parse ( plugin . MinimumAppVersion ) )
82
+ return true ;
83
+ }
84
+ catch ( Exception e )
85
+ {
86
+ API . LogException ( ClassName , $ "Failed to parse the minimum app version { plugin . MinimumAppVersion } for plugin { plugin . Name } . "
87
+ + "Plugin excluded from manifest" , e ) ;
88
+ return false ;
89
+ }
90
+
79
91
API . LogDebug ( ClassName , $ "Plugin { plugin . Name } requires minimum Flow Launcher version { plugin . MinimumAppVersion } , "
80
92
+ $ "but current version is { Constant . Version } . Plugin excluded from manifest.") ;
81
93
You can’t perform that action at this time.
0 commit comments