fix: Check that flatpak repo is configured before trying to add

This commit is contained in:
zelikos 2023-10-02 21:53:58 -04:00
parent 98a71af459
commit 7424ce86e4
No known key found for this signature in database
GPG key ID: AA0CB476ECFA09E7
2 changed files with 6 additions and 2 deletions

View file

@ -24,7 +24,9 @@ REPO_NAME=$(yq '.repo-name' $REPO_INFO)
REPO_TITLE=$(yq '.repo-title' $REPO_INFO)
# Set up system-wide Flatpak repository
flatpak remote-add --if-not-exists --system $REPO_NAME $REPO_URL
if [[ ! $REPO_URL == "null" && ! $REPO_NAME == "null" ]]; then
flatpak remote-add --if-not-exists --system $REPO_NAME $REPO_URL
fi
# If configured remote is flathub, enable it here.
# Flathub is already installed on Fedora, but not enabled by default,

View file

@ -22,7 +22,9 @@ REPO_NAME=$(yq '.repo-name' $REPO_INFO)
REPO_TITLE=$(yq '.repo-title' $REPO_INFO)
# Set up per-user Flatpak repository
flatpak remote-add --if-not-exists --user $REPO_NAME $REPO_URL
if [[ ! $REPO_URL == "null" && ! $REPO_NAME == "null" ]]; then
flatpak remote-add --if-not-exists --user $REPO_NAME $REPO_URL
fi
# Change repository title to configured title, if not null
if [[ ! $REPO_TITLE == "null" ]]; then