coffee-tools / coffee

Reference implementation for a flexible core lightning plugin manager
https://docs.page/coffee-tools/coffee
9 stars 13 forks source link

nurse command is not working as should #233

Open vincenzopalazzo opened 5 months ago

vincenzopalazzo commented 5 months ago

I think the following cases is missing by the coffee nurse command

➜  ~ coffee --network testnet remote add folgore-git https://github.com/coffee-tools/folgore.git
✗ Fetch remote from https://github.com/coffee-tools/folgore.git error: Error while add remote: code: 1, msg: '/home/vincent/.coffee/repositories/folgore-git' exists and is not an empty directory
✗ Error: code: 1, msg: '/home/vincent/.coffee/repositories/folgore-git' exists and is not an empty directory
➜  ~ coffee --network testnet nurse
✓ Coffee configuration is not corrupt! No need to run coffee nurse

cc @tareknaser

I think we should trust our database, and if in the database there is nothing we wipe everything there is on disk. What do you think?

tareknaser commented 4 months ago

Yes this can happen for various reasons. It's possible coffee remote add failed midway while cloning the repository. This might have left /home/vincent/.coffee/repositories/folgore-git in an incomplete state.

I will work on adding this case to coffee nurse

vincenzopalazzo commented 4 months ago

I think the problem is related to the repository global directory, I should finish https://github.com/coffee-tools/coffee/pull/239 before spending time into debugging this