gmodena / nix-flatpak

Install flatpaks declaratively
Apache License 2.0
276 stars 10 forks source link

installer: don't uninstall on empty OLD_STATE. #28

Closed gmodena closed 7 months ago

gmodena commented 7 months ago

Check that OLD_STATE has been populated before attempting to diff it with NEW_STATE, when determining what packages to uninstall.

Fixes the following error:

jq: error (at <unknown>): null (null) and array (["im.riot.R...) cannot be subtracted

This is the case on newly provisioned instances, with no flatpaks previously installed (either managed by nix-flatpak or unmanaged).