-
Notifications
You must be signed in to change notification settings - Fork 873
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
feat: allow custom ipfs binary #1427
Conversation
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.
(not a review, just quick feedback)
For the context, there are two things user may want to override:
- binary location
- GUI: (this PR)
- CLI: I think
IPFS_GO_EXEC
should work (refactor: remove path and ref from module args also findBin js-ipfsd-ctl#458)
- repo location
- GUI:
Advanced
→Move Repo Location
- CLI:
IPFS_PATH
env variable
- GUI:
This PR is a good opportunity to unify / double check those behaviors.
- menu items should be next to each other, perhaps separated from the rest with a line?
- expectation of persistence:
- changes made via GUI should persist across restarts
- changes made via CLI disappear when env variable is no longer set during next run
- this really needs tests
a01ef4c
to
13dda65
Compare
I wanted to add an information here about what we are doing about the Our binary wrapper on Windows: Our binary wrapper on other OSes:
Just done.
Already done.
We're not setting global env vars.
It does. And they're complicated. Windows, macOS and Linux. |
I think I interpreted you wrong @lidel! The env vars should affect IPFS Desktop. And not the opposite. About |
13dda65
to
926f876
Compare
651bfd9
to
1286ce1
Compare
@lidel tested and works on macOS and Windows. I'd like to hear some suggestions on how to automatically test this since Spectron does not allow us to test menus. |
609926a
to
d148def
Compare
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.
I'll keep quiet on the code itself but the interface LGTM 😊
d148def
to
e91ec0a
Compare
License: MIT Signed-off-by: Henrique Dias <[email protected]>
e91ec0a
to
3d15bc7
Compare
License: MIT Signed-off-by: Henrique Dias <[email protected]>
License: MIT Signed-off-by: Marcin Rataj <[email protected]>
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.
LGTM: tested on Linux, works as expected.
Ok to merge as soon CI passes and is green.
This closes #836. With this PR, the user is now able to set their own custom IPFS binary. The option to do so is under Advanced as it is an advanced feature:
If a custom IPFS binary is set, then the 'Set Custom IPFS Binary' is replaced by 'Clear Custom IPFS Binary'.
The IPFS on
PATH
now obbeys to this so theipfs
binary available for the user is the one that IPFS Desktop is using, no matter if it's provided byIPFS_GO_EXEC
, set by the user, or the default that is bundled with IPFS Desktop.Setting the environment variable
IPFS_GO_EXEC
affects the IPFS binary used while it is set. If IPFS Desktop is restarted and that variable is no longer set, we default to either the custom user defined binary or to the bundled binary.License: MIT
Signed-off-by: Henrique Dias [email protected]