
For the prefs command, we first fetch the extension info to check whether the extension exists and actually has preferences. This pattern can be useful for other commands and properties, so split out a generic helper function. https://gitlab.gnome.org/GNOME/gnome-shell/issues/2391