This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Different CLI output for jsipfs add #1813
Labels
exp/expert
Having worked on the specific codebase is important
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
Comments
alanshaw
added
exp/expert
Having worked on the specific codebase is important
help wanted
Seeking public contribution on this issue
status/ready
Ready to be worked
P2
Medium: Good to have, but can wait until someone steps up
labels
Jan 14, 2019
I'm unaware of how the node process would know it is being piped - I've never needed it before! |
Are you sure this is the case? I just saw https://github.com/ipfs/ipfs/issues/337#issuecomment-455164513 and Kyle is using the |
FWIW, you can find out if stdin/stdout is being piped by inspecting the |
Go IPFS: $ echo "hello" | ipfs add | cat
6 B / ? [--------------------------------------------------------------=-----] added QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN
$ echo "hello" | ipfs add -q | cat
QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN I think what you might have been seeing was js-ipfs adding "added" even if $ echo "hello" | jsipfs add | cat
added QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN
$ echo "hello" | jsipfs add -q | cat
QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN |
This was referenced Jul 6, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
exp/expert
Having worked on the specific codebase is important
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
When adding a file or folder, both go-ipfs and js-ipfs print to the console something like:
However, when go-ipfs gets piped into another command, it commits both the
added
andpublic/tags/stream
and only passes the hash, while js-ipfs send the whole thing.The difference in behavior makes it so that it is hard to switch back and forth as this breaks some tooling to (for example) publish websites.
The text was updated successfully, but these errors were encountered: