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