Skip to content

Commit 27432e6

Browse files
committed
docs: clarify why 'ipfs id <peer>' in offline mode
1 parent a8cdc5b commit 27432e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/commands/id.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
identify "github.com/libp2p/go-libp2p/p2p/protocol/identify"
2424
)
2525

26-
const offlineIdErrorMessage = "'ipfs id' cannot query information on remote peers without a running daemon; use the --offline option instead."
26+
const offlineIdErrorMessage = "'ipfs id' cannot query information on remote peers without a running daemon; if you only want to convert --peerid-base, pass --offline option."
2727

2828
type IdOutput struct {
2929
ID string

test/sharness/t0026-id.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test_expect_success "checking ID of self" '
5454
test_cmp expected-id actual-id
5555
'
5656

57-
test_expect_success "checking ID of random peer offline" '
57+
test_expect_success "checking and converting ID of a random peer while offline" '
5858
# Peer ID taken from `t0140-swarm.sh` test.
5959
echo k2k4r8ncs1yoluq95unsd7x2vfhgve0ncjoggwqx9vyh3vl8warrcp15 > expected-id &&
6060
ipfs id -f "<id>\n" --peerid-base base36 --offline QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N > actual-id &&

0 commit comments

Comments
 (0)