ipfs/kubo

`ipfs add -w` with stdin input

Open

#1.286 geöffnet am 23. Mai 2015

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Go (2.725 Forks)batch import
help wantedneed/community-inputtopic/commands

Repository-Metriken

Stars
 (13.906 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 2h) (28 gemergte PRs in 30 T)

Beschreibung

I wonder what ipfs add -w should do when passed stdin input.

Currently it works and ouput a hash, but I wonder what can be done with the hash and where the content passed through stdin went.

For example the following tests work when added at the end of t0040-add-and-cat.sh:

test_expect_success "'ipfs add -w' with stdin input succeeds" '
    echo "Hello Worlds!" | ipfs add -w >actual
'

test_expect_success "ipfs add -w output looks good" '
    HASH="QmSDqa1nBwj2Vstyfqii4SdUbYVVb7cBbkFq78DpsLj5wf" &&
    echo "added $HASH " >expected &&
    test_cmp expected actual
'

Contributor Guide