-
Notifications
You must be signed in to change notification settings - Fork 79
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
Detect if IPFS is initialized in a more robust way, to resolve #744 #845
Conversation
Also, the go-ipfs team recommends to test if the IPFS daemon is running by checking the swarm addresses ipfs/kubo#5983. I believe running
would be better and simpler than the current strategy:
@0xGabi Let me know if this change would be of interest |
Yes I think it's an improvement from what we had before. Thanks @dapplion ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dapplion await execa(ipfsBin, ['config', 'show'])
seems to always fail on my laptop (Mac). So it always try to initialize even when it is already initialized. Would you know why?
Until the problem is resolved, I propose we postpone this PR.
Could you provide the logs / error output when attempting to run it? What OS do you have? Also, does running directly on a terminal |
|
@0x6431346e what do you think of including this change on the 2nd iteration? |
I want to add that
|
I would advise to switch to https://github.com/ipfs/js-ipfsd-ctl instead of handling the daemon ourselves with execa calls. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for contributing to Aragon! 🦅 |
We will not pursue this new feature improvement. |
🦅 Pull Request
Detect if IPFS is initialized in a more robust way, by calling
which exits with 1 if IPFS is not initialized and with 0 if it is.
Fixes #744
🚨 Test instructions
Install IPFS using SNAP
Run
aragon ipfs
The current version produces this output
and with this PR
✔️ PR Todo