@@ -794,21 +794,27 @@ impl<R: Runtime> App<R> {
794794 // check if updater is active or not
795795 if updater_config. active {
796796 if updater_config. dialog {
797- // if updater dialog is enabled spawn a new task
798- self . run_updater_dialog ( ) ;
799- // When dialog is enabled, if user want to recheck
800- // if an update is available after first start
801- // invoke the Event `tauri://update` from JS or rust side.
802- handle. listen_global ( updater:: EVENT_CHECK_UPDATE , move |_msg| {
803- let handle = handle_. clone ( ) ;
804- // re-spawn task inside tokyo to launch the download
805- // we don't need to emit anything as everything is handled
806- // by the process (user is asked to restart at the end)
807- // and it's handled by the updater
808- crate :: async_runtime:: spawn (
809- async move { updater:: check_update_with_dialog ( handle) . await } ,
810- ) ;
811- } ) ;
797+ #[ cfg( not( target_os = "linux" ) ) ]
798+ let updater_enabled = true ;
799+ #[ cfg( target_os = "linux" ) ]
800+ let updater_enabled = cfg ! ( dev) || self . state :: < Env > ( ) . appimage . is_some ( ) ;
801+ if updater_enabled {
802+ // if updater dialog is enabled spawn a new task
803+ self . run_updater_dialog ( ) ;
804+ // When dialog is enabled, if user want to recheck
805+ // if an update is available after first start
806+ // invoke the Event `tauri://update` from JS or rust side.
807+ handle. listen_global ( updater:: EVENT_CHECK_UPDATE , move |_msg| {
808+ let handle = handle_. clone ( ) ;
809+ // re-spawn task inside tokyo to launch the download
810+ // we don't need to emit anything as everything is handled
811+ // by the process (user is asked to restart at the end)
812+ // and it's handled by the updater
813+ crate :: async_runtime:: spawn (
814+ async move { updater:: check_update_with_dialog ( handle) . await } ,
815+ ) ;
816+ } ) ;
817+ }
812818 } else {
813819 // we only listen for `tauri://update`
814820 // once we receive the call, we check if an update is available or not
0 commit comments