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

ipfs add does not support --enc=json #4459

Closed
natewalck opened this issue Dec 5, 2017 · 4 comments
Closed

ipfs add does not support --enc=json #4459

natewalck opened this issue Dec 5, 2017 · 4 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@natewalck
Copy link

natewalck commented Dec 5, 2017

ipfs version --all
go-ipfs version: 0.4.13-
Repo version: 6
System version: amd64/linux
Golang version: go1.9.2

Version information:

Enhancement? Bug?

Type:

Low

Severity:

It seems like the command should support --enc=json much like ipfs stats supports it.

Description:

When running ipfs add --enc=json it does not return the output in json.

ipfs add -rw somefolder --enc=json
added QmTKzuL8FNd1cc9Zu1qP1a9PbgJYg5pN5vBB92Q6St3Soc somefolder/folder/path
...

However, it does work when runningipfs stats bw --enc=json or any other ipfs stats commands:

ipfs stats bw --enc=json
{"TotalIn":351838,"TotalOut":352951,"RateIn":0.0000037126491990256317,"RateOut":0.0000037126491990256317}

I'm not sure if this is a bug or an enhancement request (I'd expect --enc=json to work everywhere, but obviously there are good reasons why this might not be the case).

@magik6k magik6k added the kind/bug A bug in existing code (including security flaws) label Dec 6, 2017
@keks keks self-assigned this Dec 6, 2017
@keks
Copy link
Contributor

keks commented Dec 6, 2017

Thanks for filing this. Your expectations are correct, --enc=json should work everywhere. It's just that there was a big refactor in how commands are parsed and processed and I introduced this regression. Oh well :)

@Kubuxu
Copy link
Member

Kubuxu commented Dec 7, 2017

@keks it was like that before.

@keks
Copy link
Contributor

keks commented Dec 7, 2017

Huh, I'm glad it's not my fault, then 😁. I'm pretty busy at the moment, so if we plan to get this fixed for 0.4.14 maybe someone else can take over? I assigned this to me because I thought it was due to the refactor.

@frrist
Copy link
Member

frrist commented Jan 25, 2018

There was previous discussion on this issue here - #1121. Closing in favor of it.

@frrist frrist closed this as completed Jan 25, 2018
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)
Projects
None yet
Development

No branches or pull requests

5 participants