mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-04 15:58:13 +08:00
logs(2/main) place log statements approppriately
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
parent
4b1607819f
commit
55896a86d6
@ -353,13 +353,15 @@ func commandShouldRunOnDaemon(details cmdDetails, req cmds.Request, root *cmds.C
|
||||
return false, nil
|
||||
}
|
||||
|
||||
log.Info("looking for running daemon...")
|
||||
// at this point need to know whether daemon is running. we defer
|
||||
// to this point so that some commands dont open files unnecessarily.
|
||||
daemonLocked := daemon.Locked(req.Context().ConfigRoot)
|
||||
log.Info("Daemon is running.")
|
||||
|
||||
if daemonLocked {
|
||||
|
||||
log.Info("a daemon is running...")
|
||||
|
||||
if details.cannotRunOnDaemon {
|
||||
e := "ipfs daemon is running. please stop it to run this command"
|
||||
return false, cmds.ClientError(e)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user