mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-09 10:18:04 +08:00
Merge pull request #5699 from ipfs/fix/pin-ls-output
Fix pin ls output when hash is specified
This commit is contained in:
commit
8543e27e0d
@ -547,7 +547,7 @@ func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsN
|
||||
default:
|
||||
pinType = "indirect through " + pinType
|
||||
}
|
||||
keys[c.String()] = RefKeyObject{
|
||||
keys[c.Cid().String()] = RefKeyObject{
|
||||
Type: pinType,
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,6 +45,13 @@ test_pins() {
|
||||
test $(cat verify_out | wc -l) > 8
|
||||
'
|
||||
|
||||
test_expect_success "test pin ls hash" '
|
||||
echo $HASH_B | test_must_fail grep /ipfs && # just to be sure
|
||||
ipfs pin ls $HASH_B > ls_hash_out &&
|
||||
echo "$HASH_B recursive" > ls_hash_exp &&
|
||||
test_cmp ls_hash_exp ls_hash_out
|
||||
'
|
||||
|
||||
test_expect_success "unpin those hashes" '
|
||||
cat hashes | ipfs pin rm
|
||||
'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user