Skip to content

Commit 19a8793

Browse files
authored
fix: log fsck error instead of immeditally failing (#899)
1 parent 10d964e commit 19a8793

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/utils/daemon.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@ async function cleanup (addr, path) {
1717

1818
logger.info(`[daemon] cleanup: ipfs repo fsck ${path}`)
1919
let exec = findExecutable('go', app.getAppPath())
20-
execFileSync(exec, ['repo', 'fsck'], {
21-
env: {
22-
...process.env,
23-
IPFS_PATH: path
24-
}
25-
})
26-
logger.info(`[daemon] cleanup: completed`)
20+
21+
try {
22+
execFileSync(exec, ['repo', 'fsck'], {
23+
env: {
24+
...process.env,
25+
IPFS_PATH: path
26+
}
27+
})
28+
logger.info('[daemon] cleanup: completed')
29+
} catch (e) {
30+
logger.error('[daemon] %v', e)
31+
}
2732
}
2833

2934
async function spawn ({ type, path, keysize }) {

0 commit comments

Comments
 (0)