From 58a040a6f44a9275cc63bc16ee5d7278ac96b116 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Fri, 19 Oct 2018 10:19:13 +0100 Subject: [PATCH] fix: CLI scraping of API and Gateway addresses Required for https://github.com/ipfs/js-ipfs/pull/1595 License: MIT Signed-off-by: Alan Shaw --- src/ipfsd-daemon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipfsd-daemon.js b/src/ipfsd-daemon.js index 223228e7..72233db1 100644 --- a/src/ipfsd-daemon.js +++ b/src/ipfsd-daemon.js @@ -274,8 +274,8 @@ class Daemon { output += data - const apiMatch = output.trim().match(/API (?:server|is) listening on[:]? (.*)/) - const gwMatch = output.trim().match(/Gateway (?:.*) listening on[:]? (.*)/) + const apiMatch = output.trim().match(/API .*listening on:? (.*)/) + const gwMatch = output.trim().match(/Gateway .*listening on:? (.*)/) if (apiMatch && apiMatch.length > 0) { setApiAddr(apiMatch[1])