mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-03 07:18:12 +08:00
fix(ipfs2) output info to logger when checking daemon status
This commit is contained in:
parent
86b08f4e4b
commit
22a4cc7d30
@ -212,6 +212,7 @@ func callCommand(req cmds.Request, root *cmds.Command) (cmds.Response, error) {
|
||||
|
||||
remote := !found || !local
|
||||
|
||||
log.Info("Checking if daemon is running...")
|
||||
if remote && daemon.Locked(req.Context().ConfigRoot) {
|
||||
addr, err := ma.NewMultiaddr(req.Context().Config.Addresses.API)
|
||||
if err != nil {
|
||||
@ -231,6 +232,7 @@ func callCommand(req cmds.Request, root *cmds.Command) (cmds.Response, error) {
|
||||
}
|
||||
|
||||
} else {
|
||||
log.Info("Executing command locally: daemon not running")
|
||||
node, err := core.NewIpfsNode(req.Context().Config, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user