-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
ipfs commands want to consume all stdin #858
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
Comments
Also, with stdin set up this way, ipfs get --output=$file $addr fails with "Error: Expected 1 arguments, got 2" Amazingly, </dev/null fixed that too. So stdin is somehow influencing argument processing. |
@mappum Any ideas on this one? |
the problem here is that the cmds lib is to aggressive on parsing args. It treats stdin as an input always. It should not, it should only do so for commands that enable it, and where the other arguments don't obviate stdin. |
We should fix this soon-- it's really annoying for users. |
This should be fixed as PR #1238 as been merged. |
When building a git-annex to ipfs bridge, I noticed that some ipfs commands were blocking, trying to read stdin. In this case, stdin was being used for git-annex IPC.
Commands observed to read stdin in this way:
ipfs cat $addr > file
ipfs add -q file
In both cases, I had to use </dev/null to provide ipfs with an empty stdin to avoid it hanging.
The text was updated successfully, but these errors were encountered: