fix: Check that flatpak repo is configured before trying to add
This commit is contained in:
parent
98a71af459
commit
7424ce86e4
2 changed files with 6 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue