File tree Expand file tree Collapse file tree
packages/desktop/src-tauri/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -566,8 +566,8 @@ async fn initialize(app: AppHandle) {
566566 // come from any invocation of the sidecar CLI. The progress is captured by a stdout stream interceptor.
567567 // Then in the loading task, we wait for sqlite migration to complete before
568568 // starting our health check against the server, otherwise long migrations could result in a timeout.
569- let sqlite_enabled = option_env ! ( "OPENCODE_SQLITE" ) . is_some ( ) ;
570- let sqlite_done = ( sqlite_enabled && ! sqlite_file_exists ( ) ) . then ( || {
569+ let needs_sqlite_migration = option_env ! ( "OPENCODE_SQLITE" ) . is_some ( ) && ! sqlite_file_exists ( ) ;
570+ let sqlite_done = needs_sqlite_migration . then ( || {
571571 tracing:: info!(
572572 path = %opencode_db_path( ) . expect( "failed to get db path" ) . display( ) ,
573573 "Sqlite file not found, waiting for it to be generated"
@@ -670,7 +670,7 @@ async fn initialize(app: AppHandle) {
670670 . map_err ( |_| ( ) )
671671 . shared ( ) ;
672672
673- let loading_window = if sqlite_enabled
673+ let loading_window = if needs_sqlite_migration
674674 && timeout ( Duration :: from_secs ( 1 ) , loading_task. clone ( ) )
675675 . await
676676 . is_err ( )
You can’t perform that action at this time.
0 commit comments