Skip to content

Add condition check before installing apps lists

HgO requested to merge listlists into master

Created by: tbalthazar

Looks like sudo yunohost app fetchlist -n name -u https://... now returns an error when there's already an apps list named name.

This cause the install script to fail when trying to add a list named labriqueinternet on a Cube that already has one.

I'm not sure if this behavior is new to Yunohost 2.6, but I started noticing the problem since 2.6.

This quick fix attempts to determine if a list named name already exists by grepping on name: in the output of listlists. This is not robust since it does rely on the output format of the command which might change.

@Psycojoker Thoughts on this? Is there a better/cleaner way? Should I bump the script version or add an upgrade step here? (I guess I shouldn't, but double-checking with you)

Merge request reports