-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duplicate init on gun causes corrupted state #1071
Comments
Hey @lewiada, it's only a locally corrupted state right? You should be able to fix it with a The fix I want to get in for this is lazy initialization where one no longer has to explicitly call A shorter term fix may be to check the server, or if network connectivity isn't available, the local cache, for existing data. At the moment I believe init assumes the repo doesn't exist and overwrites any existing cache. |
@endophage, I can't do that because there isn't a target yet. The GUN has been initialized, but nothing has been added to the collection. I think your last point is where the issue is. I think init should first check the server to see if a collection has been initialized, and inform the user if it already has, and only create it if it hasn't. |
|
but remove requires two params: 1) gun, 2) target |
Sorry, having a brainfart: |
After initializing a GUN and publishing the local trusted collection, repeating this process seems to result in a corrupted state. For example:
notary init server.example.com/test1
notary publish server.example.com/test1
Successfully published changes for repository docker.mot-solutions.com/adam/iwan412
notary init server.example.com/test1
notary publish server.example.com/test1
I don't feel there should be a use case to initialize a GUN twice, so the client/server should do a check to make sure it hasn't already been initialized before proceeding.
The text was updated successfully, but these errors were encountered: