Not all commands respect --api
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
#### 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.
Contributor guide
Assessment
This issue has not been assessed yet.