mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-11 19:27:51 +08:00
core/commands2: Fixed swarm command for new arguments API
This commit is contained in:
parent
0709621a2c
commit
a0bd29d5be
@ -6,7 +6,6 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
|
|
||||||
cmds "github.com/jbenet/go-ipfs/commands"
|
cmds "github.com/jbenet/go-ipfs/commands"
|
||||||
internal "github.com/jbenet/go-ipfs/core/commands2/internal"
|
|
||||||
peer "github.com/jbenet/go-ipfs/peer"
|
peer "github.com/jbenet/go-ipfs/peer"
|
||||||
errors "github.com/jbenet/go-ipfs/util/debugerror"
|
errors "github.com/jbenet/go-ipfs/util/debugerror"
|
||||||
|
|
||||||
@ -94,10 +93,7 @@ ipfs swarm connect /ip4/104.131.131.82/tcp/4001/QmaCpDMGvV2BGHeYERUEnRQAwe3N8Szb
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
addrs, err := internal.CastToStrings(req.Arguments())
|
addrs := req.Arguments()
|
||||||
if err != nil {
|
|
||||||
return nil, cmds.ClientError("Improperly formatted peer addresses: " + err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
if n.Network == nil {
|
if n.Network == nil {
|
||||||
return nil, errNotOnline
|
return nil, errNotOnline
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user