gd-plug icon indicating copy to clipboard operation
gd-plug copied to clipboard

Deleted plugins in the addons folder are still considered installed

Open univeous opened this issue 1 year ago • 5 comments

After a plugin is installed through this script, delete the plugin's whole folder in addons/, the plugin will still be considered as installed. when running install or update, nothing will happen. I think they should be re-installed.

univeous avatar May 31 '23 10:05 univeous

Yes, because currently gd-plug doesn't verify installed files when executing any commands. But it is totally doable, as all the files installed have been listed in ./plugged/index.cfg under dest_files

Current workaround would be execute uninstall then install again

The solutions I can think of:

  • Add a simple check to see if the addons/{plugin} directory exist(doesn't verify the files within), reinstall if not
  • Add new verify command to check if all files are properly installed

imjp94 avatar Jun 01 '23 00:06 imjp94

the current workaround is kind of confusing, I think your solution looks good

univeous avatar Jun 04 '23 03:06 univeous

Just ran into this today! I think it'd make sense for this verify check to run when install and/or status are called.

uninstall would remove everything, wouldn't it? I suppose it'll all get recloned again...

Slightly related, but it seems like it'd be useful to specify which addon to apply a task to - trying to get one addon fixed up can run into issues/lots of noise when another addon happens to be updated. Tho i suppose i should be pinning my addon versions.

russmatney avatar Mar 21 '24 23:03 russmatney

@russmatney One of the main reason that I wished to make verify a command on its own, was because it can be a really slow process to verify every single files.

For a cleaner workaround at the moment, you can try

  1. Comment out the plugin in plug.gd
  2. Then execute install command to remove the "unplugged" plugin
  3. Uncomment the plugin in plug.gd
  4. Execute install command again This will re-install the specific plugin alone.

Yeah, I agree, it can be really useful to handle specific addon(add, remove, update, etc.) one at a time. I am still figuring how to achieve that, because gd-plug is designed to manage plugins based on the configuration script just like vim-plug or npm.

imjp94 avatar Mar 24 '24 15:03 imjp94

Gotcha, thanks for the workaround. I eventually realized my confusion was because I hadn't specified the 'included' option, and one of my plugins was installing an earlier version of another - twas very confusing for a bit, haha

gd-plug has been great to use so far - i'm very happy to have a quicker way to manage godot addons, thanks for creating and sharing it!

russmatney avatar Mar 24 '24 17:03 russmatney