From 1fc3fa0f388f710cf29b02cceeacfeb0c3c74aaa Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Fri, 19 Oct 2018 11:33:54 +0100 Subject: [PATCH] fix: CLI scraping of API and Gateway addresses (#301) "API is listening..." changed to "API listening..." and no longer matches the regex. N.B. is backwards compatible with older versions of the daemon. Required for https://github.com/ipfs/js-ipfs/pull/1595 --- 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 a2422529..1ea0bc77 100644 --- a/src/ipfsd-daemon.js +++ b/src/ipfsd-daemon.js @@ -266,8 +266,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])