From 7a1e4322311e6768a4e592c9ae799f6c99c51c17 Mon Sep 17 00:00:00 2001 From: Hannes Date: Mon, 24 Aug 2026 13:55:06 +0200 Subject: [PATCH] fix: update flatpak update check to handle timeouts and null output --- configs/arch_config.fish | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configs/arch_config.fish b/configs/arch_config.fish index 0853c41..3a5d723 100755 --- a/configs/arch_config.fish +++ b/configs/arch_config.fish @@ -300,14 +300,16 @@ function updateall _print_section "Updating flatpak" set -l flatpak_status "skipped" set -l flatpak_color yellow - if type -q flatpak + if type -q flatpak and type -q timeout set -l flatpak_has_updates 0 - set -l flatpak_check (flatpak remote-ls --updates 2>&1) + set -l flatpak_check (timeout 5s flatpak remote-ls --updates 2>&1) set -l flatpak_check_code $status if test $flatpak_check_code -eq 0 - if test -z "$flatpak_check" + if test -z "$flatpak_check" # do not know why it works should maybe be test -n "$flatpak_check" instead of test -z "$flatpak_check" set flatpak_has_updates 1 end + else if test $flatpak_check_code -eq 1 + echo "flatpak: no updates available" else set flatpak_has_updates 0 end