Commit 55896a86 authored by Brian Tiger Chow's avatar Brian Tiger Chow

logs(2/main) place log statements approppriately

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 4b160781
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment