Skip to content

Commit

Permalink
fix: CLI scraping of API and Gateway addresses (#301)
Browse files Browse the repository at this point in the history
"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 ipfs/js-ipfs#1595
  • Loading branch information
alanshaw authored and hugomrdias committed Oct 19, 2018
1 parent 4bd11f3 commit 1fc3fa0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ipfsd-daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 1fc3fa0

Please sign in to comment.