@@ -92,7 +92,7 @@ public static AppBuilder BuildAvaloniaApp()
9292 var toplevel = GetTopLevel ( ) as Window ;
9393 if ( toplevel == null )
9494 return ;
95-
95+
9696 var dialog = new Views . Preference ( ) ;
9797 dialog . ShowDialog ( toplevel ) ;
9898 } ) ;
@@ -102,7 +102,7 @@ public static AppBuilder BuildAvaloniaApp()
102102 var toplevel = GetTopLevel ( ) as Window ;
103103 if ( toplevel == null )
104104 return ;
105-
105+
106106 var dialog = new Views . Hotkeys ( ) ;
107107 dialog . ShowDialog ( toplevel ) ;
108108 } ) ;
@@ -112,7 +112,7 @@ public static AppBuilder BuildAvaloniaApp()
112112 var toplevel = GetTopLevel ( ) as Window ;
113113 if ( toplevel == null )
114114 return ;
115-
115+
116116 var dialog = new Views . About ( ) ;
117117 dialog . ShowDialog ( toplevel ) ;
118118 } ) ;
@@ -247,7 +247,7 @@ public static Avalonia.Controls.Shapes.Path CreateMenuIcon(string key)
247247 var geo = Current ? . FindResource ( key ) as StreamGeometry ;
248248 if ( geo != null )
249249 icon . Data = geo ;
250-
250+
251251 return icon ;
252252 }
253253
@@ -257,7 +257,7 @@ public static TopLevel GetTopLevel()
257257 {
258258 return desktop . MainWindow ;
259259 }
260-
260+
261261 return null ;
262262 }
263263
@@ -302,6 +302,11 @@ public static void Check4Update(bool manually = false)
302302 } ) ;
303303 }
304304
305+ public static ViewModels . Launcher GetLauncer ( )
306+ {
307+ return Current is App app ? app . _launcher : null ;
308+ }
309+
305310 public static ViewModels . Repository FindOpenedRepository ( string repoPath )
306311 {
307312 if ( Current is App app && app . _launcher != null )
@@ -501,10 +506,15 @@ private bool TryLaunchedAsCoreEditor(IClassicDesktopStyleApplicationLifetime des
501506 private bool TryLaunchedAsAskpass ( IClassicDesktopStyleApplicationLifetime desktop )
502507 {
503508 var args = desktop . Args ;
504- if ( args == null || args . Length != 1 || ! args [ 0 ] . StartsWith ( "Enter passphrase" , StringComparison . Ordinal ) )
509+ if ( args == null || args . Length != 1 )
510+ return false ;
511+
512+ var param = args [ 0 ] ;
513+ if ( ! param . StartsWith ( "enter passphrase" , StringComparison . OrdinalIgnoreCase ) &&
514+ ! param . Contains ( " password" , StringComparison . OrdinalIgnoreCase ) )
505515 return false ;
506516
507- desktop . MainWindow = new Views . Askpass ( args [ 0 ] ) ;
517+ desktop . MainWindow = new Views . Askpass ( param ) ;
508518 return true ;
509519 }
510520
0 commit comments