Skip to content

Commit

Permalink
fix: static message when ipfs daemon dies on start (#2078)
Browse files Browse the repository at this point in the history
This improves UX and error reporting in cases like
#2038
  • Loading branch information
lidel authored Mar 25, 2022
1 parent cc75a1c commit ee3e4ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/daemon/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ async function startIpfsWithLogs (ipfsd) {
// that failed to start, allowing user to self-diagnose or report issue.
isErrored = isErrored || isSpawnedDaemonDead(ipfsd)
if (isErrored) { // save daemon output to error.log
if (logs.trim().length === 0) {
logs = 'ipfs daemon failed to start and produced no output (see error.log for details)'
}
logger.error(logs)
if (migrationPrompt) {
migrationPrompt.loadWindow(logs, isErrored, isFinished)
Expand Down

0 comments on commit ee3e4ee

Please sign in to comment.