Skip to content

Commit

Permalink
fix: log fsck error instead of immeditally failing (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias authored Apr 9, 2019
1 parent 10d964e commit 19a8793
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/utils/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ async function cleanup (addr, path) {

logger.info(`[daemon] cleanup: ipfs repo fsck ${path}`)
let exec = findExecutable('go', app.getAppPath())
execFileSync(exec, ['repo', 'fsck'], {
env: {
...process.env,
IPFS_PATH: path
}
})
logger.info(`[daemon] cleanup: completed`)

try {
execFileSync(exec, ['repo', 'fsck'], {
env: {
...process.env,
IPFS_PATH: path
}
})
logger.info('[daemon] cleanup: completed')
} catch (e) {
logger.error('[daemon] %v', e)
}
}

async function spawn ({ type, path, keysize }) {
Expand Down

0 comments on commit 19a8793

Please sign in to comment.