File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Flow.Launcher.Core/ExternalPlugins Expand file tree Collapse file tree 1 file changed +16
-4
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
4343 if ( results . Count == 0 )
4444 return false ;
4545
46- lastFetchedAt = DateTime . Now ;
47-
4846 var updatedPluginResults = new List < UserPlugin > ( ) ;
4947 var appVersion = SemanticVersioning . Version . Parse ( Constant . Version ) ;
5048
@@ -56,6 +54,8 @@ public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = fals
5654
5755 UserPlugins = updatedPluginResults ;
5856
57+ lastFetchedAt = DateTime . Now ;
58+
5959 return true ;
6060 }
6161 }
@@ -73,10 +73,22 @@ public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = fals
7373
7474 private static bool IsMinimumAppVersionSatisfied ( UserPlugin plugin , SemanticVersioning . Version appVersion )
7575 {
76- if ( string . IsNullOrEmpty ( plugin . MinimumAppVersion ) || appVersion >= SemanticVersioning . Version . Parse ( plugin . MinimumAppVersion ) )
76+ if ( string . IsNullOrEmpty ( plugin . MinimumAppVersion ) )
7777 return true ;
7878
79- API . LogDebug ( ClassName , $ "Plugin { plugin . Name } requires minimum Flow Launcher version { plugin . MinimumAppVersion } , "
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+
91+ API . LogInfo ( ClassName , $ "Plugin { plugin . Name } requires minimum Flow Launcher version { plugin . MinimumAppVersion } , "
8092 + $ "but current version is { Constant . Version } . Plugin excluded from manifest.") ;
8193
8294 return false ;
You can’t perform that action at this time.
0 commit comments