Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: dont fail on uninitialized repo #1374

Merged
merged 1 commit into from
Jun 1, 2018
Merged

Conversation

dryajov
Copy link
Member

@dryajov dryajov commented May 31, 2018

See this comment for background - ipfs/js-ipfsd-ctl#242 (comment)

@ghost ghost assigned dryajov May 31, 2018
@ghost ghost added the status/in-progress In progress label May 31, 2018
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked this works and it does 👍 - thank you

// TODO: (dryajov) This is really hacky, there must be a better way

If we require('ipfs-repo').errors we can check the error for the specific code, guarding against future changes to this message.

We should keep the other regex checks (for other possible errors) but we should use the code if possible.

@dryajov
Copy link
Member Author

dryajov commented Jun 1, 2018

@alanshaw I agree we should rework that section entirely, but I would rather wait for the rest of the datastores to emit similar error codes instead of introducing ad hoc checks. @hugomrdias is already working on this AFAIK, and this code has it's days counted (hopefully!)

@alanshaw
Copy link
Member

alanshaw commented Jun 1, 2018

Right, gotcha, if you wouldn't mind submitting a PR when we can change them all that would be great.

@alanshaw alanshaw merged commit 6f0a95b into master Jun 1, 2018
@ghost ghost removed the status/in-progress In progress label Jun 1, 2018
@alanshaw alanshaw deleted the fix/no-repo-no-fail branch June 1, 2018 15:49
dryajov added a commit that referenced this pull request Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants