Skip to content

Commit db2ad80

Browse files
committed
daemon: tolerate missing subprocess handle
Avoid failing startup checks when process state is not available.
1 parent f0b6adf commit db2ad80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/daemon/daemon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async function startIpfsWithLogs (ipfsd, flags) {
139139
let logs = ''
140140

141141
const isSpawnedDaemonDead = (ipfsd) => {
142-
if (typeof ipfsd.subprocess === 'undefined') throw new Error('undefined ipfsd.subprocess, unable to reason about startup errors')
142+
if (typeof ipfsd.subprocess === 'undefined') return false // not exposed by ipfsd-ctl (ESM)
143143
if (ipfsd.subprocess === null) return false // not spawned yet or remote
144144
if (ipfsd.subprocess?.failed) return true // explicit failure
145145

0 commit comments

Comments
 (0)