Skip to content
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

Not all commands respect --api #6132

Open
MichaelMure opened this issue Mar 26, 2019 · 1 comment
Open

Not all commands respect --api #6132

MichaelMure opened this issue Mar 26, 2019 · 1 comment
Labels
kind/bug A bug in existing code (including security flaws) P4 Very low priority

Comments

@MichaelMure
Copy link
Contributor

Version information:

go-ipfs version: 0.4.19-
Repo version: 7
System version: amd64/linux
Golang version: go1.11.5

Type: bug

Description:

When using a remote node through the command line (ex: ipfs --api="/dns4/ipfs.io/tcp/5001" id) I found out that not all commands respect the --api. As an example, version entirely ignore the flag and return the version of the command line binary instead of the remote version.

My understanding is that it's because some commands are marked a doesNotUseRepo in https://github.com/ipfs/go-ipfs/blob/master/cmd/ipfs/ipfs.go#L86.

The problem is, not using the repo and not making API call are two different concepts.

While it make sense to not use the repo for cid or commands because the command line binary is capable of dealing with the input on its own, commands like version or even init and config/edit should still honor the --api flag, version especially.

@magik6k magik6k added the kind/bug A bug in existing code (including security flaws) label Mar 26, 2019
@Stebalien
Copy link
Member

So, init can't use the API because it has to be run before the daemon starts. However, I agree version should fetch the remote version.

@momack2 momack2 added this to Inbox in ipfs/go-ipfs May 9, 2019
@autonome autonome added the P4 Very low priority label Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P4 Very low priority
Projects
No open projects
Development

No branches or pull requests

4 participants