fix(default-flatpaks): Check that system/user configuration is present
This commit is contained in:
parent
8251083a5c
commit
8bc41e6077
2 changed files with 13 additions and 6 deletions
|
|
@ -25,6 +25,7 @@ This module stores the Flatpak remote configuration and Flatpak install/remove l
|
|||
```yaml
|
||||
- type: default-flatpaks
|
||||
system:
|
||||
# If no repo information is specified, Flathub will be used by default
|
||||
repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
repo-name: flathub
|
||||
repo-title: "Flathub (system-wide)" # Optional; this sets the remote's user-facing name in graphical frontends like GNOME Software
|
||||
|
|
@ -32,8 +33,8 @@ This module stores the Flatpak remote configuration and Flatpak install/remove l
|
|||
- org.gnome.Loupe
|
||||
remove:
|
||||
- org.gnome.eog
|
||||
# A flatpak repo can also be added without having to install flatpaks,
|
||||
# as long as one of the repo- fields is present
|
||||
user:
|
||||
# A flatpak repo can also be added without having to install flatpaks
|
||||
repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
repo-name: flathub
|
||||
```
|
||||
|
|
|
|||
|
|
@ -73,8 +73,14 @@ configure_lists () {
|
|||
fi
|
||||
}
|
||||
|
||||
configure_flatpak_repo "$1" "system"
|
||||
configure_flatpak_repo "$1" "user"
|
||||
# Check that `system` is present before configuring
|
||||
if [[ ! $(echo "$1" | yq -I=0 ".system") == "null" ]]; then
|
||||
configure_flatpak_repo "$1" "system"
|
||||
configure_lists "$1" "system"
|
||||
fi
|
||||
|
||||
configure_lists "$1" "system"
|
||||
configure_lists "$1" "user"
|
||||
# Check that `user` is present before configuring
|
||||
if [[ ! $(echo "$1" | yq -I=0 ".user") == "null" ]]; then
|
||||
configure_flatpak_repo "$1" "user"
|
||||
configure_lists "$1" "user"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue