Skip to content

Commit

Permalink
feat: Throw an error if a flatpak fails to install in bazzite-flatpak…
Browse files Browse the repository at this point in the history
…-manager, add notification with icon and restart every 30 seconds until it can complete
  • Loading branch information
KyleGospo committed Oct 12, 2023
1 parent da6e58c commit d4ffe57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion system_files/desktop/shared/usr/bin/bazzite-flatpak-manager
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ REMOVE_LIST=$(cat /etc/flatpak/remove)
if [[ -n $INSTALL_LIST ]]; then
for flatpak in $INSTALL_LIST; do
if grep -qvz $flatpak <<< $FLATPAK_LIST; then
flatpak install --system --noninteractive flathub $flatpak
if ! flatpak install --system --noninteractive flathub $flatpak; then
# exit on error
exit 1
fi
fi
done
fi
Expand All @@ -41,5 +44,7 @@ if [[ -n $REMOVE_LIST ]]; then
done
fi

notify-send "Bazzite Portal" "Finished installing system flatpaks" --app-name="Bazzite Portal" -u NORMAL -i /usr/share/ublue-os/bazzite/logo.svg

mkdir -p /etc/bazzite
echo $VER > $VER_FILE
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ After=network-online.target bazzite-hardware-setup.service
Type=oneshot
ExecStart=/usr/bin/bazzite-flatpak-manager
Restart=on-failure
RestartSec=30
StartLimitInterval=0

[Install]
WantedBy=multi-user.target

0 comments on commit d4ffe57

Please sign in to comment.