Skip to content

Commit 247b3a8

Browse files
lidelhacdias
authored andcommitted
fix: don't kill daemon when remote API is used
This fixes a bug when local ipfsd.stop() was called even when no IPFS_PATH/config was present. License: MIT Signed-off-by: Marcin Rataj <[email protected]>
1 parent 3454085 commit 247b3a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/daemon/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = async function (ctx) {
7878
const log = logger.start('[ipfsd] stop daemon', { withAnalytics: 'DAEMON_STOP' })
7979
updateStatus(STATUS.STOPPING_STARTED)
8080

81-
if (!fs.pathExists(join(ipfsd.path, 'config'))) {
81+
if (!fs.pathExistsSync(join(ipfsd.path, 'config'))) {
8282
// Is remote api... ignore
8383
ipfsd = null
8484
updateStatus(STATUS.STOPPING_FINISHED)

0 commit comments

Comments
 (0)