diff --git a/cmd/ipfs2/main.go b/cmd/ipfs2/main.go index ca474c911..7b316faf1 100644 --- a/cmd/ipfs2/main.go +++ b/cmd/ipfs2/main.go @@ -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)