dcmeglio / hubitat-packagemanager

BSD 3-Clause "New" or "Revised" License
150 stars 56 forks source link

Installing an application through package manager results in duplicate if app already exists #98

Closed rsjaffe closed 4 years ago

rsjaffe commented 4 years ago

If an app is already in hubitat but not managed by package manager, installing it again results in duplicate apps. I suggest checking for existence before install, and then popping up a warning that allows a person to back out if they don't want to do that. Or, alternatively, just refuse to install a duplicate app (probably the better course of action).

dcmeglio commented 4 years ago

Did you do a match up? It's designed to handle that exact situation, otherwise yes it will duplicate.

rsjaffe commented 4 years ago

The repository was new but wasn't enabled automatically, so it didn't match up. See #97. I've now enabled the repository.

Perhaps put a warning if selecting an app from a repository that is not enabled? That might help prevent this issue.

dcmeglio commented 4 years ago

While I understand you're suggestion, if a repository is not enabled, that is intended to be the way the user can say "I don't want to use this repository" so it doesn't look at that repository at all so it wouldn't know that the package is there. So this is working as expected.